On Apr 13, 2009, at 2:01 PM, Quincey Morris wrote:

On Apr 13, 2009, at 10:07, Michael Ash wrote:

I'm confused. If you can't stand six years then you can't rely on
-finalize. Nothing guarantees that it will *ever* be called in a
timely fashion.

No need to be confused. I was just admitting your correctness and then hiding behind a smiley face.

However, the part I didn't say before was the question of whether a garbage collector that didn't collect unreferenced objects in a *reasonably* timely fashion was or was not defective. (And, yes, "timely" is somewhat elastic here.)

If the answer is that it might take six years (i.e. more or less never) then your earlier statement can't be true in any practical sense:

I don't have deep knowledge of Apple garbage collector, I'm just grateful user of it.

In general, though, it's perfectly reasonable to put off garbage collection for as long as possible. It's fairly expensive, and if there is no pressure on the resource being garbage-collected, it's perfectly reasonable to defer garbage collection until there is pressure. There's a reasonable chance that the application will terminate before then, and then you've save the effort. In other words, it's not the clock that controls whether garbage collection need to run, it's the presence of garbage.

_______________________________________________

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 arch...@mail-archive.com

Reply via email to