Re: new to memory mgmt
Re: new to memory mgmt
- Subject: Re: new to memory mgmt
- From: Nick Zitzmann <email@hidden>
- Date: Sun, 15 Feb 2004 17:03:11 -0800
On Feb 15, 2004, at 2:15 PM, pmcurry wrote:
Ah... how the intricate folds of memory management reveal themselves
so slowly!
Somehow, I was under the impression I had to create an
NSAutoreleasePool within any method where I would want to autorelease
an object I created.
You do, if:
1. You run some method in another thread, using NSThread
2. Your program runs a loop that might generate numerous megabytes (or
gigabytes) worth of temporary objects
#1 is mandatory, or else your program will leak memory continuously. #2
is usually not mandatory, although I've seen one loop generate several
gigabytes worth of objects and then crash the program because the VM
system sputtered out. It's always a good idea, though...
Nick Zitzmann
<
http://seiryu.home.comcast.net/>
<
http://www.freshlysqueezedsoftware.com/>
S/MIME signature available upon request
UNIX: Where /sbin/init is Job #1.
_______________________________________________
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.