[AGENT++] get_printable_oid memory management

Ramin Dousti ramin at cannon.eng.us.uu.net
Tue Sep 7 20:59:12 CEST 2004


On Tue, Sep 07, 2004 at 10:58:55AM -0700, Cheney, Christian wrote:

> The Vb consists of an Oid and a value.  get_printable_oid() simply calls
> get_printable() for the Oid object.  If one looks inside the
> Oid::get_printable function they will discover that the Oid object allocates
> and deletes the memory that is used to return a value in these functions.

So, is this a correct assumption that when the Vb object goes out of scope,
the pointer returned by a previous call to get_printable_...() becomes dangling?
If so, then I've got some strcpy() to do.

Thanks,
Ramin



More information about the AGENTPP mailing list