• 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: NSTextView won't deallocate
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextView won't deallocate


  • Subject: Re: NSTextView won't deallocate
  • From: Ryan Joseph <email@hidden>
  • Date: Mon, 18 Jul 2011 16:55:32 -0600

;) I was being stupid in that example, I see how my ownership was still retained until I called release (for NSTextView.alloc.initWithFrame) and removeFromSuperview (for parent.addSubview). Since there's nothing strange with NSTextView like I originally thought I just need to pay very close attention to where I'm retaining it in my code.

Thanks guys.

On Jul 18, 2011, at 4:44 PM, Kyle Sluder wrote:

>> In trying to discover where I'm not balancing the reference counting I noticed that calling removeFromSuperview in that example did NOT deallocate the object after the autorelease pool was drained but after calling release it did. The NSView docs state clearly the receiver is released but I claim it was still retained. I'm tempted to say something is wrong with NSTextView, but probably not. ;)
>
> Repeat after me: STOP THINKING ABOUT RETAIN COUNTS.
>
> If you follow the memory management rules, things will work.

Regards,
	Ryan Joseph
	thealchemistguild.com

_______________________________________________

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: NSTextView won't deallocate
      • From: Kyle Sluder <email@hidden>
References: 
 >NSTextView won't deallocate (From: Ryan Joseph <email@hidden>)
 >Re: NSTextView won't deallocate (From: Peter <email@hidden>)
 >Re: NSTextView won't deallocate (From: Ryan Joseph <email@hidden>)
 >Re: NSTextView won't deallocate (From: Graham Cox <email@hidden>)
 >Re: NSTextView won't deallocate (From: Ryan Joseph <email@hidden>)
 >Re: NSTextView won't deallocate (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: NSTextView won't deallocate
  • Next by Date: Re: NSTextView won't deallocate
  • Previous by thread: Re: NSTextView won't deallocate
  • Next by thread: Re: NSTextView won't deallocate
  • Index(es):
    • Date
    • Thread