• 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: Graham Cox <email@hidden>
  • Date: Tue, 19 Jul 2011 00:28:34 +1000

You do know about autorelease pools, right? See whether the object survives the next event cycle. I'm betting it doesn't.

Retain counts are none of your business, as is repeated almost daily on this list. Don't peek at them, infer nothing from them. Follow the ownership rules, and you'll be fine.

You can perform clean-up when the object is deallocated (NOT released, that's absolutely not the same thing - performing clean-up at release time is a sure route to disaster) by overriding -dealloc.


--Graham



On 19/07/2011, at 12:17 AM, Ryan Joseph wrote:

> I wonder why Cocoa has retained it 4 times and what it plans to do with it since I don't see thing that will cause the memory to be released.

_______________________________________________

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: Ryan Joseph <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>)

  • Prev by Date: Re: Need help debugging this
  • Next by Date: Re: A question of memory management style
  • Previous by thread: Re: NSTextView won't deallocate
  • Next by thread: Re: NSTextView won't deallocate
  • Index(es):
    • Date
    • Thread