• 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: ARC Retain Cycles
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ARC Retain Cycles


  • Subject: Re: ARC Retain Cycles
  • From: Quincey Morris <email@hidden>
  • Date: Sun, 20 Apr 2014 13:32:13 -0700

On Apr 20, 2014, at 13:22 , Dave <email@hidden> wrote:

> This App was an iOS application and previously it handled manual memory management - mostly using autorelease. I converted it by hand (didn’t use the ARC coversion process).

Ah, then ignore everything I said. :)

> if ([prop1 class] == [NSDictionary class])
> 	self.propDict = self.pProp1;

You realize that this code is utterly wrong, yes? NSDictionary is a class cluster, and so there *are no* objects of class NSDictionary, only of subclasses, most of them private to the frameworks. And even if UIImage isn’t a class cluster, particular image objects may still be a subclass.

For this situation, ‘isKindOfClass:’ seem much more likely.

_______________________________________________

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: ARC Retain Cycles
      • From: Dave <email@hidden>
References: 
 >ARC Retain Cycles (From: Dave <email@hidden>)
 >Re: ARC Retain Cycles (From: Cody Garvin <email@hidden>)
 >Re: ARC Retain Cycles (From: Quincey Morris <email@hidden>)
 >Re: ARC Retain Cycles (From: Dave <email@hidden>)

  • Prev by Date: Re: Strange toolbar/view/resize cursor interaction
  • Next by Date: Re: canAsynchronouslyWriteToURL:ofType:forSaveOperation: Prevent Quit?
  • Previous by thread: Re: ARC Retain Cycles
  • Next by thread: Re: ARC Retain Cycles
  • Index(es):
    • Date
    • Thread