[ROOT] Destructors, stack objects.

From: Timur Pocheptsoff (tpochep@mail.ru)
Date: Mon Sep 23 2002 - 09:53:37 MEST


Hi.
I have a programm with window and application object.
I use my own house-breed global debug new/delete, and I have a problem.
In my memleaks.log file there are some strings which show me, that destructors of local objects (created in function main), weren't called.	My window class has overriden virtual function CloseWindow in which I call gApplication->Terminate(0). What does Terminate do ? Using some tests, I've found out that it does something like standard exit(): only global, static objects, and static members are destructed (and objects from namespaces). Ok. There is a function SetReturnFromRun, (I can't understand, why it's protected), I create new class MyApp, derived from TApplication. In constructor SetReturnFromRun() called. But nothing changed :(((. Ok. I've overriden Terminate(), now I call gSystem->ExitLoop in it, and a result is worse: ***Break*** Segmentation violation.
Please, help. 



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:10 MET