Boost logo

Boost Users :

Subject: Re: [Boost-users] [signals2][review] The review of the signals2 library (formerly thread_safe_signals) begins today, Nov 1st
From: Igor R (boost.lists_at_[hidden])
Date: 2009-10-21 06:16:28


> I'm not sure I understand, but let me answer as if I do. The shared_ptr
bound into the boost::bind() object stored in the signal's slot is just an
ordinary shared_ptr to a heap object. It doesn't know it comes from a DLL,
nor am I especially keen to tell it.

I guess he meant something like this:

// windows-specific:
boost::shared_ptr<HINSTANCE__> ptr(LoadLibrary("mylib.dll"), &FreeLibrary);
// now you can bind "ptr" to the slots or anything that needs maylib.dll to
be alive.



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