Hello, I have some singleton class (please, don't speak about singleton usage).
class InputSystem : boost::serialization::singleton<InputSystem>
{
private:
boost::shared_ptr<sf::Window> mInputWindow;
public:
InputSystem()
{
mInputWindow = boost::shared_ptr<sf::Window>( new sf::Window(someARgs) );
someMethod();
}
void someMethod()
{
mInputWindow->...() // Calling some methods of sf::Window class
// Everything is fine here
}
const sf::Input &Handle() const
{
return mInputWindow.get()->GetInput();
}
};
void main()
{
InputSystem::get_mutable_instance().Handle(); // Here is all members of InputSystem have invalid addresses in memory (0x000)
}
What's wrong could be there?