5,321
edits
Line 294: | Line 294: | ||
** May throw <code>bad_weak_ptr</code> if you call <code>shared_from_this()</code> without <code>make_shared</code> or if you do not publically inherit <code>std::enable_shared_from_this<T></code> | ** May throw <code>bad_weak_ptr</code> if you call <code>shared_from_this()</code> without <code>make_shared</code> or if you do not publically inherit <code>std::enable_shared_from_this<T></code> | ||
* When writing functions when do not operate on pointers and do not claim ownership of objects, you should just take a reference to the object as the argument. | * When writing functions when do not operate on pointers and do not claim ownership of objects, you should just take a reference to the object as the argument. | ||
* <code>std::auto_ptr</code> was a predecessor to <code>std::unique_ptr</code> which allowed copies. It shouldn't be used anymore. | |||
====Garbage Collection==== | ====Garbage Collection==== |