Elaztek Developer Hub
Blamite Game Engine - Strings  00390.07.02.23.1947.blamite
A library containing general purpose utilities and classes for use in multiple projects.
saferelease.h File Reference

Go to the source code of this file.

Functions

template<class Type >
void SafeRelease (Type **pointer)
 Releases a pointer. More...
 
template<typename Type >
Type * SafeAcquire (Type *newObject)
 Acquires an additional reference, if non-null. More...
 
template<typename Type >
void SafeSet (Type **currentObject, Type *newObject)
 Sets a new COM object, releasing the old one. More...
 

Function Documentation

◆ SafeAcquire()

template<typename Type >
Type* SafeAcquire ( Type *  newObject)

Acquires an additional reference, if non-null.

Template Parameters
Type- The type of the object.
Parameters
newObject- The pointer to set to the new object reference.
+ Here is the caller graph for this function:

◆ SafeRelease()

template<class Type >
void SafeRelease ( Type **  pointer)

Releases a pointer.

Template Parameters
Type- The type of the object.
Parameters
pointer- The pointer to the pointer of the object to release.
+ Here is the caller graph for this function:

◆ SafeSet()

template<typename Type >
void SafeSet ( Type **  currentObject,
Type *  newObject 
)

Sets a new COM object, releasing the old one.

Template Parameters
Type- The type of the object.
Parameters
currentObject- The pointer to the pointer of the current object.
newObject- The pointer to set to the new object.
+ Here is the call graph for this function: