On 27. Jun 2009, at 14:17, Thomas Davie wrote:

Now I'm confused, because other people said, GC frees objects *when* nothing depends on them any more *or* at some point later in time. By the way, it would be different, if you said "if" instead of "when", but then, I think, you would have no point in the ongoing discussion.

Why is this a problem?

It's not a problem for me (and I didn't say so).

Nothing depends on the objects, and hence nothing can see when they're actually collected. If you're worried about running out of space because the collector is lazy

I'm not worried about this.

, then all you need to know is that as soon as you get to the "oh shit, no memory" stage, the collector runs and frees some more up (unless there really is none to free up).

All you're doing by keeping track of the dependancy graph yourself is reinventing the wheel

I'm not reinventing the wheel, I use simple retain/release based memory management -- and after all these years it *is* simple for me.

-- lots of people have put a lot of research into how to keep track of those dependancies fast, and in a way that frees up memory quickly and efficiently.

Is it correct reading your answer as "wether objects are freed *when* nothing depends on them any more *or* at some point later in time -- it does *not* matter"?

Still open question:
With GC are objects freed *when* they are used any more *or* at some point later in time?

And if it doesn't matter, doesn't it really matter in *all* cases?

By the way, I won't start using GC now because I'm in the midst of a project I started without GC. A "monster" :-) dependency graph inside is built using OpenSceneGraph, which has its own memory management mechanism.

Klaus

_______________________________________________

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