views:

45

answers:

1

Hi

My application crashes when the autorelease pool is released. The reason seems to be that the object with autorelease message is sent a release message sometime before the pool is released, hence the application crashes for object which is already released.

Hence I want to find which objects have a pending autorelease message, so that I can balance the retain .. release/autorelease messages to that object

+1  A: 

if you dont know about 'NSZombieEnabled' you definitely need to check it out - Instructions are here

It won't tell you which objects are in the autoreleasepool but it will tell you which objects are being over-released.

In brief:

1)Double-click an executable in the Executables group of your Xcode project.

2)Click the Arguments tab.

3)In the "Variables to be set in the environment:" section, make a variable called "NSZombieEnabled" and set its value to "YES".

thanks ,I used your method and came to know about class of the object. This helped me to narrow down the list of possible objects.
Hrishidev