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: Dave <email@hidden>
- Date: Fri, 29 May 2015 09:45:31 +0100
> On 28 May 2015, at 17:56, Kyle Sluder <email@hidden> wrote:
>
> 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
SourceView is ARC based, but the project I extracted the View Controller and Utility Classes into is non ARC. Given that the project is non-ARC, is the copyWithZone method above valid?
> 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.
I probably will at some point, but I’d like to get this working ok first, although it seems ok at the moment.
Cheers
Dave
_______________________________________________
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