2008/8/18 Michael Rueger <m.rueger@acm.org>:
Hilaire Fernandes wrote:
What is cycle of unused objects? Circular references of unused objects?
What I did, for the Drgeo canvas, when the user ask to dismiss it, I am releasing and forcing to nil the instance variables. But it brings other problems. I ma curious to know how developers handle this problem.
You normally don't need to nil out the variables unless you want to make sure that an object is easily recognized as invalid (e.g. you check for nil values elsewhere).
When objects don't get garbage collected they often are registered somewhere as dependents, in caches or similar places.
This is exactly what I thought at first, but I still see some instances lying in my image, I am indeed using dependents but I take care of releasing it. Hilaire