GitHub    Download    Forum
Overview
Tutorial
C++ API
General interfaces
Connection
IInstance
AddRef
Release
ISystemCallback
Memory
ObjectId
Thread
Data interfaces
Schema interfaces
Configuration interfaces
Structures
Error codes
C# API
DTDL
DADL
Setup

IInstance::AddRef

Increments the reference count for the object. This method should be called for every new copy of a pointer to an interface on the object.

Syntax

UINT32 AddRef();

Parameter

This function has no parameters.

Return value

The method returns the new reference count. This value is intended to be used for test purposes only.

Remarks

Objects use a reference counting mechanism to ensure that the lifetime of the object includes the lifetime of references to it. You use AddRef to stabilize a copy of an interface pointer. It can also be called when the lifetime of a cloned pointer must extend beyond that of the original pointer. The cloned pointer must be released by calling IInstance::Release.
© 2022 Mobiland AG