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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to