In my C++ application (using Visual Studio 2010), I need to store an std::function, like this:
class MyClass { public: typedef std::function
I would suggest you to make a copy:
MyFunction m_myFunction; //prefferd and safe!
It is safe because if the original object goes out of scope destructing itself, the copy will still exist in the class instance.