From: "Eric Woodruff" <[EMAIL PROTECTED]> > Using g++ 2.95.4, > > #include <iostream> > #include <boost/shared_ptr>
Changed to <boost/shared_ptr.hpp>. > struct Object { > ~Object () { > std::cout << "byebye" << std::endl; > } > }; > > int main () { > Object o; // destructs > boost::shared_ptr<void> (new Object); // does not destruct, however > apprears to delete > std::cout << "done." << std::endl; > } C:\Documents and Settings\pdimov\My Documents\Projects\testbed>g++ --version 2.95.3-6 C:\Documents and Settings\pdimov\My Documents\Projects\testbed>g++ testbed.cpp C:\Documents and Settings\pdimov\My Documents\Projects\testbed>a byebye done. byebye Note that you are constructing an unnamed temporary shared_ptr<void>, which is why it destructs before "done." is printed. _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost