• 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: Are Nibs forever?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Are Nibs forever?


  • Subject: Re: Are Nibs forever?
  • From: Uli Kusterer <email@hidden>
  • Date: Fri, 29 Jul 2005 00:25:15 +0200

Am Jul 28, 2005 um 23:49:25 schrieb Ian was here:
When the Nibs owner is released, I have it so it
releases any other nonview objects. Their dealloc:
methods are called.  It seems odd that if I release
the view, crash! Otherwise, it remains in memory (the
view's dealloc: method is never called).

This is wrong. The docs say that you should release all *top-level- objects*. All other objects (like views inside windows etc.) haven't been retained by you (only by their containing window) and thus you don't need to release them because they will go away when you release their container object.


So, it's not view vs. non-view. If a view is a top-level object in your NIB file, you can release it, if it's inside a window, you release the window.

Cheers,
-- M. Uli Kusterer
http://www.zathras.de


_______________________________________________ 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
  • Follow-Ups:
    • Re: Are Nibs forever?
      • From: Ian was here <email@hidden>
References: 
 >Are Nibs forever? (From: Ian was here <email@hidden>)

  • Prev by Date: Re: Core Data performance (was: Newbie Help understanding Core Data)
  • Next by Date: Re: Developing for Tiger and Panther;
  • Previous by thread: Are Nibs forever?
  • Next by thread: Re: Are Nibs forever?
  • Index(es):
    • Date
    • Thread