I have this snippet of the code: void addLineRelative(LineNumber number, LineNumber relativeNumber) { list<shared_ptr<Line> >::iterator i;
I have an object which has both a copy constructor and assignment operator defined.It is enclosed inside a sha开发者_高级运维red pointer.
Profiling some code that heavily uses shared_ptrs, I discovered that reset() was surprisingly expensive.
I\'ve just started working on a new codebase where each class contains a shared_ptr typedef (similar to this) like:
I recently started investigating Qt for myself and have the following question: Suppose I have some QTreeWidget* widget. At some moment I want to add some items to it and this is done via the followi
I want to cast the const-ness out of a boost::shared_ptr, but I boost::const_pointer_cast is not the answer.boost::const_pointer_cast wants a const boost::shared_ptr<T>, not a boost::shared_ptr&
I can\'t understand why does the following code produce memory leaks (I am using boost::shared_ptr with static class instance). Could someone help me?
I\'ve got a class that has a tr1::shared_ptr as a member, like so: class Foo { std::tr1::shared_ptr<TCODBsp> 开发者_StackOverflow社区bsp;
I am so frustrated right now after several hours trying to find where shared_ptr is located. None of the examples I see show complete code to include the headers for shared_ptr (and working). Simply s
boost::intrusive_ptr requires int开发者_JAVA百科rusive_ptr_add_ref and intrusive_ptr_release to be defined. Why isn\'t a base class provided which will do this? There is an example here: http://lists.