Boost logo

Boost Users :

From: Henri Herscher (henri.herscher_at_[hidden])
Date: 2006-01-30 17:02:25


Hi Peter,

In my case, the plugins are loaded at startup and never unloaded. I'll
try to do a small example for you to investigate.

Thanks
Henri

On 30/01/06, Peter Dimov <pdimov_at_[hidden]> wrote:
> Henri Herscher wrote:
> > Hi,
> >
> > I'm making heavy use of the boost shared pointers in the open source
> > audio recording (voip and sound devices) project I'm
> >
> > developing (http://www.oreka.org).
> >
> > The software is cross platform (Windowns/Linux) and shared pointers
> > are created in plugins and typically destroyed in other
> >
> > plugins or in the main program.
> >
> > Under linux, I haven't had any kind of problem. On windows however,
> > using MSVC++ 6SP6 I have observed strange crashes that
> >
> > happen only in the release mode. So far I think I have been able to
> > solve that doing two things (both needed or crash !):
> >
> > 1. Make sure all DLLs and the main program are compiled with the same
> > runtime (multithreaded DLL)
> > 2. Make sure all DLLs and the main program are compiled with inline
> > function exapansion disabled
> >
> > My questions:
> >
> > * Is this normal ? What have other people experienced ?
>
> 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.
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>


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