Re: release & memory problem
Re: release & memory problem
- Subject: Re: release & memory problem
- From: publiclook <email@hidden>
- Date: Fri, 2 May 2003 18:11:25 -0400
I meant to say there is at most one instance of
NSPlaceHolderMutableDictionary per memory zone per thread.
On Friday, May 2, 2003, at 12:12 AM, Lloyd Dupont wrote:
I have some memory problem :-0 (maybe age ?)
I have a small tool which exit on a SIGSEGV signal when I release the
memory pool.
apparently while trying to delete an (unknown to me)
"NSPlaceholderMutableDictionary" instance.
so I try to figure out when this class is allocated and deallocated by
posing this above class
@implementation DebugObject
- (oneway void) dealloc
{
NS_DURING
const char * cname = isa->name;
if(! strcmp(cname, "NSPlaceholderMutableDictionary")) {
printf("[%s dealloc]\n", cname);
}
NS_HANDLER
NS_ENDHANDLER
[super dealloc];
}
+ alloc
{
NS_DURING
const char * cname = ((Class) self)->name;
if(! strcmp(cname, "NSPlaceholderMutableDictionary")) {
printf("[%s alloc]\n", cname);
}
NS_HANDLER
NS_ENDHANDLER
return [super alloc];
}
@end
as NSObject
int main (int argc, const char * argv[]) {
#if DEBUG
[DebugObject poseAsClass: [NSObject class]];
#endif
the problem is....
it seems this object is never allocated !
and it SIGSEGV at deallocation with a very short call stack (on
NSAutoreleasePool() above it)
I have carefully look at all my retain/release/autorelease (not too
hard it's small tool), they looks good, so far ...
any other tip/ideas for debugging ?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.