Re: [Boost-users] Boost shared pointers and MSVC++ 6.0
-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Sohail Somani Sent: Monday, January 30, 2006 1:06 PM To: boost-users@lists.boost.org Subject: Re: [Boost-users] Boost shared pointers and MSVC++ 6.0
-----Original Message----- No, this isn't normal. shared_ptr should work even if you don't do (1) or (2), with one exception: the plugin that created a shared_ptr needs to be present in memory when the last copy of this shared_ptr is destroyed (because the creator plugin contains the destructor code.) So if you don't unload plugins dynamically, it _should_ work. If it doesn't, try to isolate a simple example for us to investigate.
How will it work if the main program is linked against the multi-threaded dll and some other library the single-threaded, but the object that was created in the MT-linked dll is deleted by the one in the ST-dll?
Wouldn't different deletes be called?
After mulling a bit, I think this is the whole point of shared_ptr. But I am not sure how it works. Is this encapsulated in the check_delete?
participants (1)
-
Sohail Somani