
sorry - i found it in the documentation. I thought the problem was in creating the pointer, but it was in the cyclic nature of the parent/child relationship. for reference, it's in the docs on shared_ptr at http://www.boost.org/doc/libs/1_45_0/libs/smart_ptr/shared_ptr.htm "Because the implementation uses reference counting, cycles of shared_ptr instances will not be reclaimed. For example, if main() holds a shared_ptr to A, which directly or indirectly holds a shared_ptr back to A, A's use count will be 2. Destruction of the original shared_ptr will leave A dangling with a use count of 1. Use weak_ptr to 'break cycles.'" -- View this message in context: http://boost.2283326.n4.nabble.com/memory-leak-when-using-shared-from-this-t... Sent from the Boost - Users mailing list archive at Nabble.com.