• 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: understanding conversions between CF and NS datatypes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: understanding conversions between CF and NS datatypes


  • Subject: Re: understanding conversions between CF and NS datatypes
  • From: Jason Coco <email@hidden>
  • Date: Fri, 29 Aug 2008 15:41:53 -0400


On Aug 29, 2008, at 13:38 , Allen Curtis wrote:
The problem: I found that if you release the CFMutableArray, you also loose
the NSMutableArray


Question:
1. Where can I get a better understanding of the data conversion between
these different frameworks?
2. Ultimately the device path names will appear in a ComboBox. Was it
necessary to convert the CFMutableArray to a NSMutableArray for the
datasource function?

It's more convenient to do it this way... however, you were just casting the
types, not converting them. You could do something like this:


serialPorts = [(NSArray*)devicePaths copy];
CFRelease(devicePaths);

Or you could just retain your serialPorts object:

serialPorts = (NSArray *)devicePaths;
[serialPorts retain];
CFRelease(devicePaths);

/jason

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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: 
 >understanding conversions between CF and NS datatypes (From: "Allen Curtis" <email@hidden>)

  • Prev by Date: Re: Bindings: Specifying the Class of a Controller’s Content
  • Next by Date: Re: Connecting NSToolbar and NSTabView
  • Previous by thread: Re: understanding conversions between CF and NS datatypes
  • Next by thread: Re: understanding conversions between CF and NS datatypes
  • Index(es):
    • Date
    • Thread