MDN may have intermittent access issues April 18 13:00 - April 19 01:00 UTC. See whistlepig.mozilla.org for all notifications.

mozilla
Your Search Results

    nsISupports

    この記事はまだ日本語に翻訳されていません。MDN の翻訳はボランティアによって行われています。是非 MDN に登録し、私たちの力になって下さい。

    All XPCOM interfaces inherit this interface.
      Last changed in Gecko 1.0

    Method overview

    nsrefcnt AddRef();Violates the XPCOM interface guidelines
    void QueryInterface(in nsIIDRef uuid, [iid_is(uuid),retval] out nsQIResult result);
    nsrefcnt Release();Violates the XPCOM interface guidelines

    Methods

    Violates the XPCOM interface guidelines

    AddRef()

    Notifies the object that an interface pointer has been duplicated.

    nsrefcnt AddRef();
    
    Parameters

    None.

    Return value

    An integer value that is generally ignored.

    QueryInterface()

    The QueryInterface method provides runtime type discovery.

    Note: The interface pointer, aResult, returned by QueryInterface must be released by a call to Release() when it is no longer needed. QueryInterface is a symmetric, transitive, and reflexive operator.

    void QueryInterface(
      in nsIIDRef uuid,
      [iid_is(uuid),retval] out nsQIResult result
    );
    
    Parameters
    uuid
    The uuid of the requested interface
    result
    The resulting interface pointer.
    Exceptions thrown
    NS_ERROR_NO_INTERFACE
    The requested interface is not available.

    Violates the XPCOM interface guidelines

    Release()

    Notifies the object that an interface pointer has been destroyed and any resources the object held on behalf of the client can be released.

    nsrefcnt Release();
    
    Parameters

    None.

    Return value

    An integer value that is generally ignored.

    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.

    ドキュメントのタグと貢献者

    最終更新者: Sheppy,