• 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
Re: release & memory problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >release & memory problem (From: Lloyd Dupont <email@hidden>)

  • Prev by Date: Re: release & memory problem
  • Next by Date: Re: Calling ObjC instance method from C
  • Previous by thread: Re: release & memory problem
  • Next by thread: How to make file packages?
  • Index(es):
    • Date
    • Thread