Re: using object after being released. How to find which is ?
Re: using object after being released. How to find which is ?
- Subject: Re: using object after being released. How to find which is ?
- From: Ken Thomases <email@hidden>
- Date: Fri, 3 Apr 2009 13:59:18 -0500
On Apr 3, 2009, at 10:41 AM, Daniel Luis dos Santos wrote:
I am having a problem with an object that is being used after it has
been released. I am using auto release pools. In the gdb log it
tells me :
IsolatedTestRunner(9952,0xb013e000) malloc: *** error for object
0x821800: incorrect checksum for freed object - object was probably
modified after being freed.
*** set a breakpoint in malloc_error_break to debug
How can I find which object is it from the address ? Until now I
have been stepping over the code and I can't find the address
(besided the fact that it is difficult remembering memory
addresses). I have the block of code isolated and know more or less
what is the scope of the error. Besides, the messages refers an
object. Does this mean an objective C object or just any memory that
was allocated with malloc ?
You can use MallocDebug and malloc_history to achieve this. See the
man pages for malloc(3) and malloc_history(1) for details.
You can also use the Object Allocations instrument.
Regards,
Ken
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden