--- In Boost-Users@y..., "Brian"
--- In Boost-Users@y..., "Gennadiy E. Rozental"
wrote: This was discussed during Boost.Test review. Peter some time ago made a changes in boost::shared_ptr that allows it to be used with Borland 5.5 namely in the situation you described.
Gennadiy.
Hi...could you clarify this? All I noticed was that shared_ptr had that compile time check for an incomplete type removed, whereas scoped_ptr still has it. Are you saying that if I switch from scoped_ptr to shared_ptr the destructor will get called?
Regards,
Brian Neal
The general idea: class A { ... A() : m_deleter( checked_deleter() ) ~A() { m_deleter( m_ptr ); } deleter_function m_deleter; T* m_ptr; }; AFAIK this way compiler does not know in a destructor what will happend with the m_ptr and does not try to istantiate ~T(). Gennadiiy.