• 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: Memory question when added a view to the superView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory question when added a view to the superView


  • Subject: Re: Memory question when added a view to the superView
  • From: Dave Carrigan <email@hidden>
  • Date: Fri, 10 Sep 2010 13:03:14 -0700

On Sep 10, 2010, at 12:57 PM, Philip Vallone wrote:
> If I create a view and add it to my superview, am I no longer the owner and do not have to release it?

That's not how cocoa memory management works. Nothing can ever take ownership from you; if you own something, you have to release it. If you add the view to another view, the parent view also takes ownership, which means that there are now two owners. But since you still own that view, you have to release it.

--
Dave Carrigan
email@hidden
Seattle, WA, USA

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Memory question when added a view to the superView
      • From: Philip Vallone <email@hidden>
    • Re: Memory question when added a view to the superView
      • From: Dave DeLong <email@hidden>
References: 
 >Memory question when added a view to the superView (From: Philip Vallone <email@hidden>)

  • Prev by Date: Memory question when added a view to the superView
  • Next by Date: Re: Memory question when added a view to the superView
  • Previous by thread: Memory question when added a view to the superView
  • Next by thread: Re: Memory question when added a view to the superView
  • Index(es):
    • Date
    • Thread