• 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: Weird problem involving memory management and global variable
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Weird problem involving memory management and global variable


  • Subject: Re: Weird problem involving memory management and global variable
  • From: mmalc Crawford <email@hidden>
  • Date: Tue, 29 May 2007 03:07:44 -0700


On May 29, 2007, at 2:13 AM, Sam Stigler wrote:

Everything seems to be fine until another method in the same class asks for the variable, at which point (although the variable's retainCount is still 2) I receive an EXC_BAD_ACCESS and KERN_PROTECTION_FAILURE. Does anyone know why this could be?

Because the variable has been deallocated.

Check your init method, and re-read <http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/index.html >, notably <http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Tasks/MemoryManagementRules.html > and <http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmPractical.html >.

mmalc

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: 
 >Weird problem involving memory management and global variable (From: Sam Stigler <email@hidden>)

  • Prev by Date: Re: Weird problem involving memory management and global variable
  • Next by Date: Re: Weird problem involving memory management and global variable
  • Previous by thread: Re: Weird problem involving memory management and global variable
  • Next by thread: Re: Weird problem involving memory management and global variable
  • Index(es):
    • Date
    • Thread