CsToCppPorter::MemoryManagement Class Reference

Defines a method that changes the lifetime of objects. More...

Static Public Member Functions

template<typename T1 , typename T2 >
static T1 BindLifetime (const T1 &target, const T2 &source)
 Creates a smart pointer using the aliasing constructor.   More...
 

Detailed Description

Defines a method that changes the lifetime of objects.

Member Function Documentation

◆ BindLifetime()

template<typename T1 , typename T2 >
static T1 CsToCppPorter::MemoryManagement::BindLifetime ( const T1 &  target,
const T2 &  source 
)
inlinestatic

Creates a smart pointer using the aliasing constructor.  

Template Parameters
T1Type of smart pointer to the object that the new smart pointer will refer to.  
T2Type of smart pointer to an object whose ownership is shared with a new smart pointer.  
Parameters
targetSmart pointer to the object that the new smart pointer will refer to.  
sourceSmart pointer to an object whose ownership is shared with a new smart pointer.  
Returns
New smart pointer.