On Wed, Apr 16, 2008 at 12:04 PM, Clark Cox <[EMAIL PROTECTED]> wrote: > The purpose of the write barrier is to tell the collector to keep > something alive; it has nothing to do with when to collect it.
Right, I get that now. [snip] > Garbage Collection: > The housekeeping is taken care of, I don't have to worry about it. > However, I cannot know exactly when my object will be destroyed (it > might be right away, it might be in a couple of seconds). I don't see the relevance of this. The Cocoa GC explicitly only works properly if you play by the rules it sets out. For example, if you store a pointer in unscanned memory then you're playing with fire and the object may well have been destroyed by the next time you try to use it. Skipping write barriers likewise. I had thought that using write barriers for clearing memory was part of the required rules, but now it appears that it is not. But regardless, Cocoa GC only takes care of its housekeeping when you take care of yours. Mike _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]