Problem with serializing a MIB
Frank Fock
Frank.Fock____t-online.de
Thu Feb 8 22:16:01 CET 2001
Hello Wenfried,
Wenfried Schwenkner wrote:
> MibGroup grp("1");
>
> grp.add(new MibLeaf("1", READONLY, 1));
>
> mib.add(&grp);
Here may be the crash is caused.
When mib is deleted its destructor will delete all groups
added to the Mib instance. As grp has been allocated
on stack this will cause a segmentation violation. Please
allocate MIB objects always on the heap. Mib will
delete all objects added to it using Mib::add(..) when
it is destroyed.
Best regards,
Frank
More information about the AGENTPP
mailing list