• 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
dealloc not beeing called... why?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

dealloc not beeing called... why?


  • Subject: dealloc not beeing called... why?
  • From: Development <email@hidden>
  • Date: Mon, 8 Jul 2002 09:33:47 +0200

Hello there,

I didn't find anything about this topic in the docs, so maybe someone here can point me to an answer.

I create a new project in PB ("Cocoa Application", not document-based, because I need to have just one main window). After subclassing NSObject in IB, I add two functions to the new class:

- (id)init{
NSLog(@"Called init");
if (self = [super init]){
NSLog(@"Called [super init]");
}
return self;
}

- (void)dealloc{
NSLog(@"Called dealloc");
[super dealloc];
}

Problem:
though init get called as expected, dealloc never get called...

If I do this with an "Cocoa Document-based Application", everything works fine.

Do I have to make my App document-based and deactivate the <New> menu command or is there another recommended way to accomplish this?

Thanks in advance,
Dirk Stegemann
_______________________________________________
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: dealloc not beeing called... why?
      • From: Ondra Cada <email@hidden>
  • Prev by Date: Create an Cocoa Scriptable application :
  • Next by Date: ld: undefined symbol _main (but a main does exist)
  • Previous by thread: Re: Create an Cocoa Scriptable application :
  • Next by thread: Re: dealloc not beeing called... why?
  • Index(es):
    • Date
    • Thread