VirtualBox Main API
Public Member Functions | List of all members
IToken Interface Reference

The IToken interface represents a token passed to an API client, which triggers cleanup actions when it is explicitly released by calling the abandon method (preferred, as it is accurately defined when the release happens), or when the object reference count drops to 0. More...

Inheritance diagram for IToken:

Public Member Functions

void abandon ()
 Releases this token.
 
void dummy ()
 Purely a NOOP.
 

Detailed Description

The IToken interface represents a token passed to an API client, which triggers cleanup actions when it is explicitly released by calling the abandon method (preferred, as it is accurately defined when the release happens), or when the object reference count drops to 0.

The latter way is implicitly used when an API client crashes, however the discovery that there was a crash can take rather long, depending on the platform (COM needs 6 minutes). So better don't rely on the crash behavior too much.

Interface ID:
{20479EAF-D8ED-44CF-85AC-C83A26C95A4D}

Member Function Documentation

◆ abandon()

void IToken::abandon ( )

Releases this token.

Cannot be undone in any way, and makes the token object unusable (even the dummy method will return an error), ready for releasing. It is a more defined way than just letting the reference count drop to 0, because the latter (depending on the platform) can trigger asynchronous cleanup activity.

◆ dummy()

void IToken::dummy ( )

Purely a NOOP.

Useful when using proxy type API bindings (e.g. the webservice) which manage objects on behalf of the actual client, using an object reference expiration time based garbage collector.