smart-pointers
how to return an null tr1::shared_ptr and test if it is null
I have a function getA() with the following signature: class A { public: typedef std::tr1::shared_ptr <A> Ptr;[详细]
2023-01-14 14:54 分类:问答Simple reference counting: smart pointers
I would like to implement a simple reference counting using smart pointers. The variable pointer represents pointer to stored object, reference_count represents total count of copies of the object.[详细]
2023-01-14 02:56 分类:问答Shared pointers: pointer to pointer
Common pointers allows you to create pointer to pointer: void foo(Object **o) {} int main() { Object * o = new Object();[详细]
2023-01-13 21:14 分类:问答Smart Pointer Implementation in C [duplicate]
This question already has answers here: 开发者_高级运维 Closed 12 years ago. Possible Duplicate:[详细]
2023-01-13 21:02 分类:问答Should a library use an interface that uses smart pointers?
I\'m starting to write a library and considering its interface. Previous libraries I\'ve written all use raw pointers (both internally and in its interface), and now I want to try the smart pointer li[详细]
2023-01-13 05:21 分类:问答enable_shared_from_this and objects on stack
Is there a way to prevent shared_from_this() call for a stack-allocated object ? The enable_shared_from_this<> in the base classes list is a 开发者_StackOverflowstrong indicator for class user,[详细]
2023-01-12 23:34 分类:问答How to use C++ Smart Pointers?
I\'ve been using C++ for some time now and I still don\'t feel very comfortable about using smart pointers and I\'ve only been using them when editi开发者_运维百科ng some code that uses them, never in[详细]
2023-01-11 08:21 分类:问答What is the right way to put a smart pointer in class data (as class member) in C++?
Suppose I have a class Boda: class Boda { ... }; And I have a member cydo in this class that I want to be a smart pointer (that is, I want it to get deallocated automatically as soon as the class g[详细]
2023-01-11 07:43 分类:问答Can anyone give some hints or point to a tutorial on how to extract just one specific piece from Boost?
I want to use smart pointers in my code but I can\'t figure out how to take them out from开发者_JAVA百科 the Boost.[详细]
2023-01-11 05:18 分类:问答Example to use shared_ptr?
Hi I asked a question today about How to insert different types of objects in the same vector arrayand my code in that question was[详细]
2023-01-11 05:12 分类:问答