• 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: NSAllocateCollectable memory allocation problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSAllocateCollectable memory allocation problem


  • Subject: Re: NSAllocateCollectable memory allocation problem
  • From: Michael Babin <email@hidden>
  • Date: Mon, 21 Jun 2010 09:47:51 -0500

On Jun 21, 2010, at 7:06 AM, julius wrote:

> Inside MyControl define three pointers of type  CGFloat , e.g CGFloat * mem1, mem2, mem3;
> and declare them as @property GFloat * mem1; etc with corresponding @synthesize statements.
> Declare a MyControl method that allocates memory to mem1 etc, e.g.
> 	self.Mem2 = (CGFloat *)NSAllocateCollectable((sizeof(CGFloat) * 22000),NSScannedOption);

I believe you need to add a __strong qualifier to your pointers (i.e., __strong CGFloat * mem1;), to prevent them from being collected.



_______________________________________________

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: NSAllocateCollectable memory allocation problem
      • From: julius <email@hidden>
References: 
 >NSAllocateCollectable memory allocation problem (From: julius <email@hidden>)

  • Prev by Date: Memory management on returning nil in init
  • Next by Date: Re: Memory management on returning nil in init
  • Previous by thread: Re: NSAllocateCollectable memory allocation problem
  • Next by thread: Re: NSAllocateCollectable memory allocation problem
  • Index(es):
    • Date
    • Thread