The enable_shared_from_this helper contains a weak pointer that is set when creating shared pointer to the object. That means there is the reference-count (allocated separately or together with the ob
Consider: struct SomethingThatsABase { virtual bool IsChildOne() const { return false; } virtual bool IsChildTwo() const { return false; }
So to deal with large blobs of memory either for an image or similar there are clea开发者_Python百科rly lots of options.
I am writing a library that includes an interface to return\\receive shared_ptr objects. Everything seemed just dandy until I was reminded that an application using my library could have a different
I\'m trying to write a managed wrapper (C++/CLI) around an unmanaged C++ static library and am having two problems:
So I have such function: boost::shared_ptr<my_class> get_class_by_name(std::string name) { typedef std::map<boost::shared_ptr<my_class>, my_description> map_t;
I have a situation where I have a shared_ptr to base of a child class. When the shared_ptr goes to delete the pointer, only the parent destructor is being called.
I want to have the following class structure: #include <tr1/memory> class Interface; class Impl; class Impl
I\'m doing something similar to this item Correct BOOST_FOREACH usage? However, my returned list is wrapped in a boost::shared_ptr.If I do not assign the list to a variable before the BOOST_FOREACH l
I have a class which can\'t be create开发者_Python百科d on heap and it has private destructor. But there is a function which returns a pointer to such constructed object. I want to make a shared poin