nsISupports
From MDC
[edit] Summary
All XPCOM interfaces inherit the nsISupports interface.
#include "nsISupports.h"
[scriptable, uuid=(0000000-0000-0000-c000-000000000046)]
interface nsISupports { ... };
[edit] Methods
-
AddRef - The
AddRefmethod notifies the object that an interface pointer has been duplicated.
-
QueryInterface - The
QueryInterfacemethod provides runtime type discovery.
-
Release - The
Releasemethod notifies the object that an interface pointer has been destroyed and any resources the object held on behalf of the client can be released.
[edit] Remarks
The method descriptions above were taken from Essential COM by Don Box. The point of those descriptions is to highlight the fact that Addref and Release do not necessarily correspond to incrementing and decrementing a counter, respectively, even though that is how they are usually implemented.
On Win32 systems, nsISupports is ABI-compatible with Microsoft COM's IUnknown interface.