Skip to content

Commit 9ae003d

Browse files
ClémentClément
authored andcommitted
adding small comment about Clear for dictionary.
1 parent 1f5e7a8 commit 9ae003d

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

source/code/projects/Dictionary_chaining/Dictionary/Dictionary.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,5 @@ public bool IsEmpty()
138138
}
139139
}
140140
return empty;
141-
142141
}
143142
}

source/lectures/data/dictionary.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,3 +248,5 @@ This method
248248
```{download="./code/projects/Dictionary_chaining.zip"}
249249
!include code/projects/Dictionary_chaining/Dictionary/Dictionary.cs
250250
```
251+
252+
Note that lists are re-used when `Clear` is called, instead of being set to `null`.

0 commit comments

Comments
 (0)