1816
General / Re: Class Destructed on Function Return?
« on: August 22, 2012, 06:07:42 am »
I want to yell profanities at you , you included worthless compiled debug exe but didn't include the images so I had to comment out all of your trolly asserts.
Anyway, the problem is your GetGameObjectManager(); returns a copy(define a copy c-tor to see for yourself) and you probably wanted a reference, these are two changes that seem to fix the problem:
Line 14 of Game.h should be this:
Anyway, the problem is your GetGameObjectManager(); returns a copy(define a copy c-tor to see for yourself) and you probably wanted a reference, these are two changes that seem to fix the problem:
Line 14 of Game.h should be this:
static GameObjectManager& GetGameObjectManager();
Line 107 of Game.cpp should be this:GameObjectManager& Game::GetGameObjectManager()