locked
std collection of ref class

    Question

  • I have a public ref class that I am trying to put in either a std::map, std::multimap, or std::set.  I can arrange my data structure to use any.  Ideally, if it were in a set, I would use the Class^ as the type and do a pointer compare so that I never have multiple instances of the same object in the collection.

    The other problem spot is that this collection is a static member of the class and the object will not be removed from the collection until the destructor is called, so I need to avoid a circular reference.

    Friday, January 18, 2013 6:44 PM

Answers

  • It looks like Platform::WeakReference does what I need.
    • Marked as answer by diltsman Friday, January 18, 2013 7:17 PM
    Friday, January 18, 2013 7:17 PM

All replies