AAO DRAMA/DRAMA2 C++ Interface
DRAMA C++11 and later interface

◆ ShallowCopy() [1/3]

virtual void drama::sds::Id::ShallowCopy ( const Id source)
inlinevirtual

Shallow copy from a const sds::Id which will outlive this object.

Copy another sds::Id item into this object. Any existing SDS ID referred to by this object is cleaned up first.

After the copy, both the source and this object refer to the same SDS structure (and same SDS ID). But when this object goes out of scope, the SDS ID is NOT free-d and the structure is not deleted.

Warning
If the source object goes is destroyed and the ID is free-ed before the this object is destroyed, then this object will refer to and invalid or wrong SDS id. Only use this approach when you know the source object will outlast the copy.
See also
sds::Id::Copy
Parameters
sourceThe Sds object to copy. Must outlive this object.

References drama::CreateRunDramaTask().

Referenced by drama::sds::DataPointer< T >::DataPointer(), drama::sds::DataPointer< T[]>::DataPointer(), drama::sds::DataPointer< T >::DataPointer(), drama::sds::DataPointer< T[]>::DataPointer(), and drama::thread::TAction::SetReturnArg().