hacker emblem
jaegerfesting
Search | Tags | Photos | Flights | Gas Mileage | Log in

Smart Pointers

Posted by Zan Lynx on 2006-02-03 09:55:04

World-readable

auto_ptr is pretty neat, and useful for many situations. But there are more smart pointers to remember with cool features of their own! :-)

Boost is a great library, and everyone should have one. One of the Boost smart pointers that is going into the next version of the C++ standard is shared_ptr. This baby keeps a reference count and can be owned in more than one place. That makes it great for putting into STL containers, unlike auto_ptr, which passes its ownership around and tends to get accidentally deleted when used with containers.


Reply

Tech blog 1: Spurious memory leak messages in Visual Studio (2006-02-02 21:37:26)
this is a neat, if unintelligable, hack
- Jaeger's comment in BMAS::Service::Domain, 11 October 2002