RE: [Boost-Users] Re: Borland C++ Builder 5.5 & scoped_ptr
Are you saying that if I switch from scoped_ptr to shared_ptr the destructor will get called?
Is he saying that the destructor is NOT getting called with scoped_ptr? (!)
--Mark Storer
Software Engineer
Cardiff Software
#include <disclaimer>
typedef std::disclaimer<Cardiff> Discard;
-----Original Message-----
From: Peter Dimov [mailto:pdimov@mmltd.net]
Sent: Thursday, September 19, 2002 11:07 AM
To: Boost-Users@yahoogroups.com
Subject: Re: [Boost-Users] Re: Borland C++ Builder 5.5 & scoped_ptr
From: "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?
Yes, shared_ptr will call the destructor. It only requires a complete type at construction time. Info: http://www.boost.org Wiki: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl Unsubscribe: mailto:boost-users-unsubscribe@yahoogroups.com Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
--- In Boost-Users@y..., Mark Storer
Are you saying that if I switch from scoped_ptr to shared_ptr the destructor will get called?
Is he saying that the destructor is NOT getting called with scoped_ptr? (!)
--Mark Storer Software Engineer Cardiff Software
No. Borland C++ Builder 5.5 (with debug turned on) generates the destructor code in the wrong translation unit. So suddenly my auto_ptr's, scoped_ptr's, etc, hold pointers to incomplete types. The auto_ptr's don't call the destructors, and the scoped_ptr's won't compile (because of that cool compile time incomplete type check). I tried switching to shared_ptr but my destructors were not called either. I am so mad at Borland right now. Brian Neal
participants (2)
-
Brian
-
Mark Storer