• 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: Needed : set class for Cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Needed : set class for Cocoa


  • Subject: Re: Needed : set class for Cocoa
  • From: Tommy Nordgren <email@hidden>
  • Date: Sat, 7 Feb 2009 05:02:11 +0100


On Feb 6, 2009, at 2:50 AM, Sean McBride wrote:

Tommy Nordgren (email@hidden) on 2009-02-06 7:55 PM said:

I have decided to do an implementation myself, as an objective c++
wrapper to
std::set<id>.  I want to use the class to aid in destruction of
directed cyclical object graphs,
in dual mode frameworks.

"Dual mode" as in both Retain-Release and Garbage Collection? If so, be
careful. I don't think an std::set will keep strong references to the
Obj-C objects it contains. You may need to CFRetain()/CFRelease() your
objects manually.


Sean


No It won't; However, I intend to use this class only from the dealloc method of the object that manages
the object graph, so that it will be possible to reclaim the space if the framework is run on systems without gc
enabled.
What I intend to do is :
1 Create a custom subclass of NSCoder, that stores each object pointer passed to encodeObject:
in a set.
2. Retains each set member
3. Passes each set member a message telling it to release each reference it's retained.
4. Release each set member
and 5. Release any references kept directly in the managing object.


----------------------------------
Skinheads are so tired of immigration, that they are going to move to a country that don't accept immigrants!
Tommy Nordgren
email@hidden




_______________________________________________

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: 
 >Needed : set class for Cocoa (From: Tommy Nordgren <email@hidden>)
 >Re: Needed : set class for Cocoa (From: "Sean McBride" <email@hidden>)
 >Re: Needed : set class for Cocoa (From: Tommy Nordgren <email@hidden>)
 >Re: Needed : set class for Cocoa (From: "Sean McBride" <email@hidden>)

  • Prev by Date: Re: Animated toolbar
  • Next by Date: how to get iphone calendar database file
  • Previous by thread: Re: Needed : set class for Cocoa
  • Next by thread: Re: Needed : set class for Cocoa
  • Index(es):
    • Date
    • Thread