• 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: NSString's "mutableCopy" creating a leak?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSString's "mutableCopy" creating a leak?


  • Subject: Re: NSString's "mutableCopy" creating a leak?
  • From: j o a r <email@hidden>
  • Date: Wed, 1 Oct 2008 13:36:40 -0700


On Oct 1, 2008, at 1:16 PM, Christopher J Kemsley wrote:

I was not aware that I shouldn't explicitly call a dealloc... Why not? Replacing it with a "release" in the object made that leak go away, but I still don't understand why I can't dealloc it.


I would suggest that you read the memory management documentation. Any answers you get here can't serve as a substitute for reading and understanding the official documentation.

Explicitly calling dealloc is in direct conflict with the reference counting scheme used by Cocoa. Dealloc should only be called implicitly, ie. not by you, as the retain count of an object reaches zero.

j o a r


_______________________________________________

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


References: 
 >Re: NSString's "mutableCopy" creating a leak? (From: Christopher J Kemsley <email@hidden>)

  • Prev by Date: Re: NSString's "mutableCopy" creating a leak?
  • Next by Date: Re: Print report using WebView
  • Previous by thread: Re: NSString's "mutableCopy" creating a leak?
  • Next by thread: Re: NSString's "mutableCopy" creating a leak?
  • Index(es):
    • Date
    • Thread