Boost logo

Boost Users :

From: Sohail Somani (s.somani_at_[hidden])
Date: 2006-01-30 17:24:58


 

> -----Original Message-----
> From: boost-users-bounces_at_[hidden]
> [mailto:boost-users-bounces_at_[hidden]] On Behalf Of
> Sohail Somani
> Sent: Monday, January 30, 2006 1:06 PM
> To: boost-users_at_[hidden]
> 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?


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net