[xsd-users] how long is a pointer still valid when working
with the data object model?
Boris Kolpackov
boris at codesynthesis.com
Mon Jan 31 11:23:18 EST 2011
Hi Erik,
Erik Sjölund <erik.sjolund at gmail.com> writes:
> Does this mean that I could add an non-fundamental C++ type with
>
> void push_back (std::auto_ptr<X>)
>
> multiple times but at different places? As ownership is assumed when
> doing the push_back I would later have to detach in order to not cause
> the object to be freed multiple times when the data object model is
> freed.
Yes, you can do this, if you are careful ;-).
Boris
More information about the xsd-users
mailing list