Showing posts with label smart pointer. Show all posts
Showing posts with label smart pointer. Show all posts

Dec 26, 2008

smart pointer

smart pointer

automatic cleanup, automatic initialization, avoid dangling pointer
Local variables:auto_ptr
Class members:Copied pointer
STL Containers:Garbage collected pointer (e.g. reference counting/linking)
Explicit ownership:transfer Owned pointer
Big objects:Copy on write
http://ootips.org/yonat/4dev/smart-pointers.html