Re: NSAllocateCollectable memory allocation problem
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