Re: Found It - Problem with Outline View and Manual Memory Management
Re: Found It - Problem with Outline View and Manual Memory Management
- Subject: Re: Found It - Problem with Outline View and Manual Memory Management
- From: Kyle Sluder <email@hidden>
- Date: Thu, 28 May 2015 11:56:35 -0500
On Thu, May 28, 2015, at 08:37 AM, Dave wrote:
> Hi,
>
> This is from Apple Sample Code so I thought something as fundamental as
> this would have been dealt with correctly. This is the copy method inside
> the “ImageAndTextCell” class,
>
> -(id) copyWithZone:(NSZone*) zone
> {
> ImageAndTextCell *cell = (BJImageAndTextCell*) [super copyWithZone:zone];
> cell.pTextCellImage = self.pTextCellImage;
>
> return cell;
> }
I'm guessing this is taken from the SourceView sample? That project uses
ARC. If you are using ARC in your own project, sending -copyWithZone: to
super should do the right thing. (Yes, whether super does the right
thing is based on whether _your class_ is compiled using ARC.)
In any event, please consider moving to a view-based table view. Then
you don't need to use a custom cell class at all.
--Kyle Sluder
_______________________________________________
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