I have a Singleton class implemented like this:
class QueueManager : public QObject
{
Q_OBJECT
public:
static QueueManager *instance() {
static QueueManager ins;
return &ins;
}
private:
QueueManager(QObject *parent = 0);
~QueueManager() {
system("touch ./shared/documents/exec.txt");
}
};
I realized that ~QueueManager()
is never called (exec.txt is not created). But, as pointed out in this thread, C++ standard says that the destructor should get called at the end. Why isn't it called in my case?
I'm on BlackBerry 10, using the qcc compiler.