[Q] Collectin lots of garbage
Martin Drautzburg
martin.drautzburg at web.de
Tue Sep 30 19:32:22 UTC 2003
Suppose I have a tree of objects. Each object maintains a collection
of children and each child holds a reference to its parent. The root
node is kept in a class variable. Let there be 100,000 objects.
If I chop off the root node then 100,000 objects will have to be
garbage collected. I would assume that this will take a lot of time
doesn't it.
When will that happen ? At any time ?
Will it make my application seem to hang ?
Is the parent pointer a bad idea because this way no object will ever
have a refence cound of zero or is reference counting not used at all?
Would it be better to use weak references somewhere ?
More information about the Squeak-dev
mailing list
|