• 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: NSCopyObject is a disaster (was Re: Another NSOutlineView issue)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSCopyObject is a disaster (was Re: Another NSOutlineView issue)


  • Subject: Re: NSCopyObject is a disaster (was Re: Another NSOutlineView issue)
  • From: Uli Kusterer <email@hidden>
  • Date: Mon, 13 Aug 2012 23:16:03 +0200

On 09.08.2012, at 02:01, Greg Parker <email@hidden> wrote:

>    - (id) copyWithZone:(NSZone*) zone
>    {
>        MyCell* copy = [super copyWithZone:zone];
>        copy->someInternalPointer = [copy->someInternalPointer copy];
>        return copy;
>    }

Change this to

> - (id) copyWithZone:(NSZone*) zone
>    {
>        MyCell* copy = [super copyWithZone:zone];
>        copy->someInternalPointer = [someInternalPointer copy];
>        return copy;
>    }


And it's correct even without ARC. Replace copy with retain for those non-ARC cases where it makes sense.

Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de




_______________________________________________

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

References: 
 >Another NSOutlineView issue (From: Graham Cox <email@hidden>)
 >NSCopyObject is a disaster (was Re: Another NSOutlineView issue) (From: Graham Cox <email@hidden>)
 >Re: NSCopyObject is a disaster (was Re: Another NSOutlineView issue) (From: Greg Parker <email@hidden>)
 >Re: NSCopyObject is a disaster (was Re: Another NSOutlineView issue) (From: Graham Cox <email@hidden>)
 >Re: NSCopyObject is a disaster (was Re: Another NSOutlineView issue) (From: Greg Parker <email@hidden>)

  • Prev by Date: Re: NSCopyObject is a disaster (was Re: Another NSOutlineView issue)
  • Next by Date: Using NSPipe to get system command output
  • Previous by thread: Re: NSCopyObject is a disaster (was Re: Another NSOutlineView issue)
  • Next by thread: Re: NSCopyObject is a disaster (was Re: Another NSOutlineView issue)
  • Index(es):
    • Date
    • Thread