• 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: which cocoa objects to dealloc ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: which cocoa objects to dealloc ?


  • Subject: Re: which cocoa objects to dealloc ?
  • From: Paul Lynch <email@hidden>
  • Date: Sat, 18 Mar 2006 10:37:05 +0000


On 18 Mar 2006, at 10:25, Karim Morsy wrote:

put logs in all of my custom object''s dealloc methods and obviously none of them seems to get called when the app terminates.
for example, my custom NSView... when I send release to it before the app quites nothing happens. if I send release twice the app crashes. so in short...do I have to explicitly send dealloc to ANY custom object I create, be it a view, a controller, or something else ?

I have no idea why you are trying to send dealloc, or release, to your objects. These methods are responsible for freeing memory, and when your app terminates, the memory taken by the process is freed by the system.


Never send dealloc yourself. Sending release/dealloc to a freed object will cause a crash, that is correct behaviour.

Paul
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >which cocoa objects to dealloc ? (From: Karim Morsy <email@hidden>)

  • Prev by Date: which cocoa objects to dealloc ?
  • Next by Date: Re: which cocoa objects to dealloc ?
  • Previous by thread: which cocoa objects to dealloc ?
  • Next by thread: Re: which cocoa objects to dealloc ?
  • Index(es):
    • Date
    • Thread