Kent

Joined: 12 Sep 2008 Posts: 12
|
Posted: Fri 7 Nov 14:16:43 2008 Post subject: |
|
|
C++ destructors are only called at run-time, and not by the OS process cleanup, so we can't blame Windows on this one. (The OS process exit cleanup should free up the memory allocated, though.)
Likely this is a bug in CDP if the destructors aren't called. I ran into a similar issue for CDP global component objects recently. The CDPComponent objects have a long life-time in a CDP application, meaning due to potential dangling pointers, they cannot be deallocated until fairly late. This means that even if/when the Component destructors are called, you will not be able to rely on much of CDP to be in an initalized state while in the CDPComponent destructor.
So depending on what you are trying to do, it might make more sense to run this as part of Suspend state transition or in the Destroy virtual method (which should be called regardless of the destructor).
Hope this helps, _________________ Kent Dahl - Software Developer
Industrial Control Design AS - http://www.icd.no/ |
|