next up previous contents index
Next: 4.8 oskit_stream: standard interface Up: 4.7 oskit_iunknown: base interface Previous: 4.7.2 addref: Increment an

4.7.3 release: Release a reference to an interface

 

SYNOPSIS

#include <oskit/com.h>

OSKIT_COMDECL_U release(oskit_iunknown_t *obj);

DESCRIPTION

This method decrements the interface's reference count (or the object's reference count, if the object implements only one counter for all its interfaces). The object destroys itself if its reference count drops to zero. Note that the client must be careful never to release a reference too many times, or to release a reference to a different interface from the one on which addref was called, or chaos will surely ensue.

PARAMETERS

obj
The interface on which to release a reference.

RETURNS

Returns the new reference count. This return code should only be used for debugging purposes, as its value is generally unstable at run time and its behavior depends on the object's implementation.



University of Utah Flux Research Group