15 Dec
2014
15 Dec
'14
2:13 p.m.
On Monday, December 15, 2014 04:31 AM, John Selbie wrote:
What is the general guidance with using shared_ptr on interfaces that do not have virtual destructor?
http://www.boost.org/doc/libs/1_57_0/libs/smart_ptr/shared_ptr.htm#pointer_c... "[This constructor is a template in order to remember the actual pointer type passed. The destructor will call delete with the same pointer, complete with its original type, even when T does not have a virtual destructor, or is void]" You should also be good with make_shared, which is preferred. Ben