discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bogus retain via NSEnumerator


From: Pete French
Subject: Re: bogus retain via NSEnumerator
Date: Wed, 21 Apr 2004 19:02:57 +0100

David Stes <stes@D5E02AFE.kabel.telenet.be> writes:
> Yes, like in enumerating 2,000,000 objects and having 2,000,000 objects
> in the autoreleasepool so that memory is released only after 2,000,000
> iterations instead of immediately when the object is no longer used.

But unless you released the container class then the objects *are* still
being used by the container. If you *have* released the container then you
cant enumerate it! This seem like a nonsense argument to me.

If you just want to run through the objecst in the container and use each one
once, releasing it when done, then you are effectively taking them out of
the container. If you actually do this then they will be released when you
expect - i.e. each time round the loop.

-bat.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]