[AGENT++] get_printable_oid memory management

Cheney, Christian CheneyC at wsdot.wa.gov
Tue Sep 7 21:42:40 CEST 2004


Yes. When the Vb object goes out of scope, the memory is deleted.  At this
point, a copy of the pointer returned by a previous call to
get_printable_oid() becomes invalid.

-----Original Message-----
From: Ramin Dousti [mailto:ramin at cannon.eng.us.uu.net]
Sent: Tuesday, September 07, 2004 11:59 AM
To: agentpp at agentpp.org
Subject: Re: [AGENT++] get_printable_oid memory management


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
_______________________________________________
AGENTPP mailing list
AGENTPP at agentpp.org
http://agentpp.org/mailman/listinfo/agentpp



More information about the AGENTPP mailing list