Re: [AGENT++] AgentX++: Problem with destructor
fock at agentpp.com
fock at agentpp.com
Tue Jun 1 19:48:01 CEST 2004
Hi Alexander,
The destructor should have been called. May be something
else in your code removes the MIB object ungracefully?
Best regards,
Frank
alexander link <link.alexander at firemail.de> schrieb am 01.06.2004,
13:37:00:
> 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