Hi Robert,

I get more info : the singleton is not destroyed, but is called from the lib
I did and from the exe itself. When the lib call the singleton, it works
good. when the exe call the singleton, It does a new call to constructor ...


Any idea about how to solve that problem ?

Thanks.

Regards,
   Vincent.

2009/5/19 Robert Osfield <robert.osfi...@gmail.com>

> On Tue, May 19, 2009 at 2:24 PM, Vincent Bourdier
> <vincent.bourd...@gmail.com> wrote:
> > Hi Robert,
> >
> > I think I get it :
> >
> > I seems to be due to the osgDB::DynamicLibrary instance I use, which
> ref_ptr
> > unref when leaving the load code, so the destructor of the
> > RegisterReaderWriterProxy (my equivalent) was called, and it seems to be
> > sufficient to force a new call to the Registry constructor.
> >
> > Does it sounds right for you ?
>
> I can't comment on code I'm not party to.
>
> As a general note one shouldn't be able to delete a internally
> singleton used in my example without doing a instance()=0;  Just take
> a ref_ptr<> to the return won't delete the object as the instance()
> method keeps around a copy.
>
> Robert.
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to