[AGENT++] AgentX++: Problem with destructor

alexander link link.alexander at firemail.de
Tue Jun 1 15:37:00 CEST 2004


Hi.

I've got a problem with the destructor of my private added mib class. It seems that it is never called.
The mib file is added in void init(SubAgentXMib& mib) and looks like this:

mib.add("", new my_private_mib("", &mib));

At the end of int main(int argc, char* argv[]) there is the statement
delete SubagentXMib.

So when I interrupt the while loop in the main routine with CTRL+C the above statement (delete 
SubagentXMib) is reached. My assumption was that this call would (also) invoke the destructor of 
my_private_mib. But this is not true, for I have verified it with the debugger.

Because of additional thread cleaning purposes the destructor call is necessarily needed.
Is there anything I can do or is there anything I haven't considered carefully?

Regards Alexander

_________________________________________________________________
www.ebay.de Hier Finden Sie Auktionen und Festpreisangebote!





More information about the AGENTPP mailing list