Re: Autoreleasepool problems
Re: Autoreleasepool problems
- Subject: Re: Autoreleasepool problems
- From: Kay Roepke <email@hidden>
- Date: Wed, 19 Jul 2006 22:02:52 +0200
On 19. Jul 2006, at 21:39 Uhr, Jerry Krinock wrote:
Although it says
the same thing that Shawn said, maybe this will help engage your
brain to
find this one
Yup. I walked away, had dinner and then looked at it again. It was
precisely this sort of problem. I was using two instances
of NSCFString which were returned by a substring call to a string. My
code generator was buggy in that it released those objects (which
happend to end up at the same address, that's why I had two) and much
later the EOF token occupied the same address. When the pool was
released the eof token
got overreleased, obscuring the actual reason. Had me happily run off
in the wrong direction for a couple of hours.
ObjectAlloc should have some option to automatically perform some
balance analysis of alloc/dealloc events. That would make it much
easier.
Unfortunately I couldn't get OmniObjectMeter to run my tool, because
I have to set DYLD_FRAMEWORK_PATH et al. It might actually have that
function.
At the end of the day I was lucky that I had two overreleased
instances of those substrings in precisely the right order to provoke
the crash, or I
wouldn't even have noticed this early on.
Thanks for the input,
-k
--
Kay Röpke <email@hidden>
classdump Software
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden