• 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: Obj-C server and signal handling
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Obj-C server and signal handling


  • Subject: Re: Obj-C server and signal handling
  • From: Dave Camp <email@hidden>
  • Date: Thu, 14 Feb 2008 11:41:04 -0800

On Feb 14, 2008, at 11:32 AM, Dave Camp wrote:

On Feb 14, 2008, at 10:48 AM, Matt Mashyna wrote:

	NSRunLoop *loopy = [NSRunLoop currentRunLoop];
	while (keepRunning && [loopy runMode:NSDefaultRunLoopMode
		beforeDate:[NSDate dateWithTimeIntervalSinceNow:1.0]]);



Creating an NSDate in that tight loop will leak memory on each iteration.

Clarification: it's not really leaked as it goes into the main autorelease pool, but that pool isn't drained until you exit..


Dave

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Obj-C server and signal handling (From: Matt Mashyna <email@hidden>)
 >Re: Obj-C server and signal handling (From: Dave Camp <email@hidden>)

  • Prev by Date: Re: Obj-C server and signal handling
  • Next by Date: Re: In-loop releasing of objects does not free memory?
  • Previous by thread: Re: Obj-C server and signal handling
  • Next by thread: Re: Obj-C server and signal handling
  • Index(es):
    • Date
    • Thread