<p>In a VB6 application, I have a <code>Dictionary</code> whose keys are <code>String</code>s and values are instances of a custom class.  If I call <code>RemoveAll()</code> on the <code>Dictionary</code>, will it first free the custom objects?  Or do I explicitly need to do this myself?</p>

<pre><code>Dim d as Scripting.Dictionary

d("a") = New clsCustom
d("b") = New clsCustom

' Are these two lines necessary?
Set d("a") = Nothing
Set d("b") = Nothing

d.RemoveAll
</code></pre>

Yes, all objects in the
```
Dictionary
```
will be released after a call to
```
RemoveAll()
```
.  From a performance (as in speed) standpoint I would say those lines setting the variables to
```
Nothing
```
are unnecessary, because the code has to first look them up based on the key names whereas
```
RemoveAll()
```
will enumerate and release everything in one loop.