3 ms·
http://www.boost.org/libs/smart_ptr/shared_ptr.htm http://www.boost.org/libs/smart_ptr/shared_ptr.htm Granted, it's not garbage collection, but sometimes you h
by jey 19y ago
http://www.boost.org/libs/smart_ptr/shared_ptr.htm http://www.boost.org/libs/smart_ptr/shared_ptr.htm
Granted, it's not garbage collection, but sometimes you have to write C++ and boost makes that manageable. boost::shared_ptr is based on refcounts, so you need to be aware of cycles and use boost::weak_ptr accordingly.