Re: release not done right away
Re: release not done right away
- Subject: Re: release not done right away
- From: "M. Uli Kusterer" <email@hidden>
- Date: Tue, 27 Apr 2004 23:35:38 +0200
At 13:28 Uhr +0200 21.04.2004, Nicolas Berloquin wrote:
What I'm wondering now is where to start/end an autorelease pool for
the second type of timers ?
What about ending the autorelease immediately:
NSAutoReleasePool* pool = [[NSAutoReleasePool alloc] init];
NSTimer* myTimer = ...; // create autoreleased timer.
[myTimer retain]; // Retain timer so it doesn't go away
with the pool.
[pool release];
Now you have a retained myTimer. When you don't need it anymore,
release it and it will immediately disappear.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
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.