• 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: [NSView removeFromSuperview] not affecting retain count
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [NSView removeFromSuperview] not affecting retain count


  • Subject: Re: [NSView removeFromSuperview] not affecting retain count
  • From: "John C. Randolph" <email@hidden>
  • Date: Mon, 20 Dec 2004 13:26:36 -0800

On Dec 20, 2004, at 11:04 AM, Julian Pellico wrote:


My advice is always that you shouldn't try to track retain count like
that. What if it's autoreleased?
It would hardly be safe for the frameworks to autorelease it.
It's not only safe, it's perfectly appropriate for the framework code to autorelease a view to balance the -retain that the view got when added to its superview.

I might
want that NSView well past the end of the run loop.
Whenever you want something to stick around, it's up to you to retain it.

-jcr

John C. Randolph <email@hidden> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html


_______________________________________________ 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: 
 >[NSView removeFromSuperview] not affecting retain count (From: Julian Pellico <email@hidden>)
 >Re: [NSView removeFromSuperview] not affecting retain count (From: j o a r <email@hidden>)
 >Re: [NSView removeFromSuperview] not affecting retain count (From: Julian Pellico <email@hidden>)

  • Prev by Date: Re: Do you care if user changes the SystemFont?
  • Next by Date: Re: Do you care if user changes the SystemFont?
  • Previous by thread: Re: [NSView removeFromSuperview] not affecting retain count
  • Next by thread: Re: [NSView removeFromSuperview] not affecting retain count
  • Index(es):
    • Date
    • Thread