discuss-gnustep
[Top][All Lists]
Advanced

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

Re: bogus retain via NSEnumerator


From: David Stes
Subject: Re: bogus retain via NSEnumerator
Date: Thu, 22 Apr 2004 17:27:05 GMT
User-agent: tin/1.5.8-20010221 ("Blue Water") (UNIX) (Linux/2.4.18 (i686))

In comp.lang.objective-c John C. Randolph <jcr@nospam.idiom.com> wrote:
> 
>> The Apple memory management is especially inferior for stuff like
>> enumerators, because you are forced to keep a counter of how many times you
>> are autoreleasing inside a loop. 
> 
> I've *never* had to do what you describe above.

But do you test for this condition, in your programs ?

"Defensive programming" is about assuming that there may actually be many
elements in a collection, so if you enumerate over them (for instance in a
generic message) that you're not creating a bottleneck by autoreleasing tons
of objects.


reply via email to

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