Quantcast
Channel: Xojo Programming Forum - Latest topics
Viewing all articles
Browse latest Browse all 3866

How to ensure that a classes Destructor is called and executed?

$
0
0

Hello all,

I have a console app that is daemonized and running on a raspberry pi 4. It appears to stop running at unpredictable times. As part of the investigation, we put some code in the destructor method to show the stack and other variables. However the most important thing is, we want to know if that method is firing and when it fires (the log will show that if the Destructor method is fired) .

Trying to test this to make sure that the code in the destuctor method actually runs. Since it is a daemon, we use init,d to manage the app. What would be the best way to test this? Using the Kill PID command kills it, but the destructor does not appear to run since there are not records created.

When we try to kill the app when in the debug build mode, the Destructor does not fire either…

Any ideas or suggestions would be appreciated!

Thanks,
Tim

5 posts - 4 participants

Read full topic


Viewing all articles
Browse latest Browse all 3866

Trending Articles