¡@

Home 

c++ Programming Glossary: ownership

What is a smart pointer and when should I use one?

http://stackoverflow.com/questions/106508/what-is-a-smart-pointer-and-when-should-i-use-one

ability to be copied which also unexpectedly transfers ownership std auto_ptr MyObject p1 new MyObject std auto_ptr MyObject.. new MyObject std auto_ptr MyObject p2 p1 Copy and transfer ownership. p1 gets set to empty p2 DoSomething Works. p1 DoSomething..

How to pass objects to functions in C++?

http://stackoverflow.com/questions/2139224/how-to-pass-objects-to-functions-in-c

thumb for C 11 Pass by value except when you do not need ownership of the object and a simple alias will do in which case you pass..

How do you declare an interface in C++?

http://stackoverflow.com/questions/318064/how-do-you-declare-an-interface-in-c

a virtual destructor. This allows you to pass pointer ownership to another party without exposing the concrete derived class...

smart pointers (boost) explained

http://stackoverflow.com/questions/569775/smart-pointers-boost-explained

smart pointer. There are three important properties. no ownership at all transfer of ownership share of ownership The first means.. important properties. no ownership at all transfer of ownership share of ownership The first means that a smart pointer cannot.. no ownership at all transfer of ownership share of ownership The first means that a smart pointer cannot delete the object..

Which kind of pointer do I use when?

http://stackoverflow.com/questions/8706192/which-kind-of-pointer-do-i-use-when

pointers c faq share improve this question Shared ownership The shared_ptr and weak_ptr the standard adopted are pretty.. This one was not adopted by the standard. Unique ownership Boost also has a scoped_ptr which is not copyable and for which.. unique_ptr 20.7.1 provides a better solution. ”end note No ownership Use dumb pointers raw pointers or references for non owning..