Share

Memory management in Executor SDK

Owner template

The Owner<> class template is a smart pointer that owns and manages an object pointer. It is defined in the file Owner.h. This class template is similar to the std::unique_ptr<> class template. The Owner<> template is used by the Executor SDK to store object instances for many classes of the SDK, and it can also be used in other contexts, independent of the Executor SDK.

When an object instance must be allocated by the host application and returned to the Executor SDK (for example, the Functor argument that is passed to the Workspace's template method addGraphContainerT<>()), or vice-versa, the Owner<> template will be used to pass such object between the host application and the Executor SDK to ensure that the memory is allocated and released using the same memory heap.

Please refer to the BifrostGraph::Executor::Owner<> class template in the API reference section.

Was this information helpful?