• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
release & memory problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

release & memory problem


  • Subject: release & memory problem
  • From: Lloyd Dupont <email@hidden>
  • Date: Fri, 2 May 2003 14:12:23 +1000

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.

  • Follow-Ups:
    • Re: release & memory problem
      • From: publiclook <email@hidden>
    • Re: release & memory problem
      • From: publiclook <email@hidden>
  • Prev by Date: What's the deal with NSScrollView?
  • Next by Date: Re: count only defined for abstract class error
  • Previous by thread: What's the deal with NSScrollView?
  • Next by thread: Re: release & memory problem
  • Index(es):
    • Date
    • Thread