• 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 NSViews autoreleased or released?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Are NSViews autoreleased or released?


  • Subject: Re: Are NSViews autoreleased or released?
  • From: Erik Buck <email@hidden>
  • Date: Tue, 6 Dec 2005 13:14:19 -0800 (PST)

Generally speaking, you CAN control when auto released objects are released by the auto release pool.

Just create your own auto release pool, then close the window. (which in turn apparently auto releases its views...are you SURE?). Then release your auto release pool. All objects in your auto release pool will be released immediately.

Alternatively:
Consider using a window controller for each window so that you know the top level objects in the window are all released. Then have your window controller register for notification of relevant array elements being dealloced. Then send the notification when array elements are dealloced and use that notification to break any bindings that remain to the dealloced object. Then the release order of the window and the array elements becomes irrelevant.
_______________________________________________
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

  • Prev by Date: Re: IBOutlet and Shared Instances
  • Next by Date: Re: "Cocoa Programming" by Scott Anguish
  • Previous by thread: Re: Are NSViews autoreleased or released?
  • Next by thread: Scroller partially visible in NSView
  • Index(es):
    • Date
    • Thread