Re: Autorelease pools?
Re: Autorelease pools?
- Subject: Re: Autorelease pools?
- From: Charles Srstka <email@hidden>
- Date: Thu, 18 Mar 2004 20:44:41 -0600
If you've got a loop that creates a lot of autoreleased objects, and
the loop is doing something like, say, running once for each line in a
file, and then you run your app on a really large file, your memory
usage is going to skyrocket. This can lead to poor performance as the
disk starts getting hit by the swapfiles. If your app eats memory fast
enough, you can make the computer so unusable that it will take forever
just to get to the Terminal, much less to actually kill your app. Plus,
if the hard drive is low on space, the OS will start running out of
swap space, and problems will ensue. I used to actually be able to make
10.1 kernel panic this way. Needless to say, I now put autorelease
pools on loops quite liberally.
Charles
On Mar 18, 2004, at 7:47 PM, Kevin Ballard wrote:
Can anybody tell me what's the point of creating your own autorelease
pools when Cocoa automatically creates one for you?
--
Kevin Ballard
email@hidden
http://www.tildesoft.com
http://kevin.sb.org
[demime 0.98b removed an attachment of type
application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.