• 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: Autorelease pool
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Autorelease pool


  • Subject: Re: Autorelease pool
  • From: Wim Lewis <email@hidden>
  • Date: Wed, 7 Oct 2009 19:49:13 -0700


On Oct 7, 2009, at 2:53 PM, Michael Süssner wrote:
After my test program has passed successfully the drain method of the autorelease buffer is called and "sometimes" I get the following error:
Program received signal: “EXC_BAD_ACCESS”.
sharedlibrary apply-load-rules all



How can I track which object has already been release:

You can enable zombies, which will mark deallocated objects' memory with what they used to be, and can also prevent anything from being actually deallocated ever, but is a useful way to investigate this kind of problem (if you can reach the problem before you run out of memory :) )


See NSDebug.h in Foundation.framework for some info on this.

The code is rather simple:
	NSArray *vPolyArray = [NSArray arrayWithObjects: ... ];
	[vPolyArray release];

You're over-releasing vPolyArray. +arrayWithObjects: returns an autoreleased instance, and you're also releasing it explicitly, so by the time NSAutoreleasePool gets around to releasing it, it's already gone.



_______________________________________________

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


  • Follow-Ups:
    • Re: Autorelease pool
      • From: Michael Süssner <email@hidden>
References: 
 >Autorelease pool (From: Michael Süssner <email@hidden>)

  • Prev by Date: Re: View Hierarchies for apps like Quartz Composer
  • Next by Date: Re: app delegate +initialize
  • Previous by thread: Re: Autorelease pool
  • Next by thread: Re: Autorelease pool
  • Index(es):
    • Date
    • Thread