• 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: “EXC_BAD_ACCESS” on Custom TableView with custom NSCell when clicking.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: “EXC_BAD_ACCESS” on Custom TableView with custom NSCell when clicking.


  • Subject: Re: “EXC_BAD_ACCESS” on Custom TableView with custom NSCell when clicking.
  • From: Jim Correia <email@hidden>
  • Date: Wed, 17 Feb 2010 17:03:21 -0500

On Feb 17, 2010, at 4:41 PM, Gustavo Pizano wrote:

> Maybe I misunderstood I must conform NSCopying protocol also even when using core data?

If you have an NSCell subclass which adds iVars, you must implement -copyWithZone: to do correct memory management.

Your -copyWithZone: needs to work correctly within the bounds of the object ownership rules.

If you have an object iVar which shouldn’t be copied, but is still an owned reference, then you can (and must) retain it instead in the copy.

(You should do this for all cells with iVars, not just ones with object iVars, so that your subclass will behave correctly in the future even if NSCell doesn’t implement its behavior using NSCopyObject.)

- Jim_______________________________________________

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: “EXC_BAD_ACCESS” on Custom TableView with custom NSCell when clicking.
      • From: Gustavo Pizano <email@hidden>
References: 
 >“EXC_BAD_ACCESS” on Custom TableView with custom NSCell when clicking. (From: Gustavo Pizano <email@hidden>)
 >Re: “EXC_BAD_ACCESS” on Custom TableView with custom NSCell when clicking. (From: Corbin Dunn <email@hidden>)
 >Re: “EXC_BAD_ACCESS” on Custom TableView with custom NSCell when clicking. (From: Gustavo Pizano <email@hidden>)

  • Prev by Date: Re: Quartz2D paths from vector?
  • Next by Date: Re: “EXC_BAD_ACCESS” on Custom TableView with custom NSCell when clicking.
  • Previous by thread: Re: “EXC_BAD_ACCESS” on Custom TableView with custom NSCell when clicking.
  • Next by thread: Re: “EXC_BAD_ACCESS” on Custom TableView with custom NSCell when clicking.
  • Index(es):
    • Date
    • Thread