• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: release not done right away
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >release not done right away (From: Nicolas Berloquin <email@hidden>)
 >Re: release not done right away (From: Nicolas Berloquin <email@hidden>)
 >Re: release not done right away (From: Nicolas Berloquin <email@hidden>)

  • Prev by Date: Re: Transparency?
  • Next by Date: Re: Restore Application With last open document
  • Previous by thread: Re: release not done right away
  • Next by thread: Re: release not done right away
  • Index(es):
    • Date
    • Thread