Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Does cocoa just leak?



This is a really great tip and should be a tech note (if it isn't already; a quick search didn't find one).

At 10:50 AM -0700 9/30/01, Vince DeMarco wrote:
On Saturday, September 29, 2001, at 08:37 pm, Rosyna wrote:
for (i=0;i<5000;i++)
[[instance URL] path];

Reimplement the above like this

for(i=0;i<5000;i++){
NSAutoreleasePool *pool;

pool = [[NSAutoreleasePool alloc] init];

[instance ULR];

/* Do lots of other interesting stuff */

[pool release];
}

Everything should be okay now.

--
_Deirdre rm -rf /bin/laden http://deirdre.net


References: 
 >Re: Does cocoa just leak? (From: Vince DeMarco <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.