GitHub
Download
Forum
Overview
Tutorial
C++ API
General interfaces
Data interfaces
UDomain
UStorage
UObject
UList
UBitFlagSet
UBitFlagSetSingle
WDomain
WObject
AddRef
Compare
GetClassInfo
GetDomain
GetId
GetLastError
GetLock
GetNextSame
GetObject
IsDirty
IsOfType
LoadData
NeedsUpdate
Release
StoreData
IEventClient
Schema interfaces
Configuration interfaces
Structures
Error codes
C# API
DTDL
DADL
Setup
WObject::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
U
INT32
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
WObject::Release
.
© 2022 Mobiland AG