Friday, March 26, 2010

Application crash

Recently I had very interesting problem. There was an object which caused an application crash when it was deleted. During debugging the content of the object's destructor worked properly, but after a closing bracket application just crashed. After time consuming investigation I found out that the object was defined as global, on the stack. Then a pointer to it was passed to some method which at some point deleted this object using that pointer. Of course when the program exited it tried to destroy already destroyed object.

No comments: