Hi , i was doing a little reading on scoped pointers and i came to aline which stated
"Since a scoped pointer simply stores and solely owns an address, the implementation ofboost::scoped_ptr
is less complex than std::auto_ptr
.
boost::scoped_ptr
should be preferred if transfer of ownership is not required. In these situations, it may be a better choice thanstd::auto_ptr
to avoid inadvertent transfer of ownership."
Now what does transfer of ownership mean ?? Could anyone give an example of what transfer of ownership means ??
and i also came along scoped boost scoped array whats the difference between Scoped Array and boost scoped Pointer.
What i know is that boost scoped array is merely used as a pointer to store the address of Arrays that we have created..
A little bit of background and more information would be helpful..
A candle loses nothing by lighting another candle.