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

Re: dealloc not beeing called... why?


  • Subject: Re: dealloc not beeing called... why?
  • From: Development <email@hidden>
  • Date: Tue, 9 Jul 2002 16:34:30 +0200

Hi,

Am Montag den, 8. Juli 2002, um 14:38, schrieb Ondra Cada:


Presumed you not only subclased the object in IB, but instantiated it there too, and use it as an application controller, right?

Right.


There is thus no outlet to this instance anywhere; it gets created when the NIB is loaded, and exists till application quits, right?

Well, if so... since you don't ever free the object, its dealloc doesn't get called. It's that simple.

OK, but I thought, the OS would care about the deallocation of the object. It has the -dealloc method already built-in and whoever created the instance of my subclasses NSObject after NIB load has to call this -dealloc method eventually, no?!

If not, what's the right time and where's the right place to call the objects -dealloc method, i.e. is there a recommended way to do this? I have to do some clean up before quitting the app...

Maybe to intercept some kind of message?
Better subclass NSApplication instead of NSObject to have better control over app runtime?

tia,
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: James DiPalma <email@hidden>
    • Re: dealloc not beeing called... why?
      • From: Nathan Day <email@hidden>
References: 
 >Re: dealloc not beeing called... why? (From: Ondra Cada <email@hidden>)

  • Prev by Date: Can copyPath copy files larger than 1GB?
  • Next by Date: Re: accessor generation???
  • Previous by thread: Re: dealloc not beeing called... why?
  • Next by thread: Re: dealloc not beeing called... why?
  • Index(es):
    • Date
    • Thread