Your Search Results

    NS_IF_RELEASE

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

    This page still needs some work, help to improve it!

    Summary

    Macro

    Decrements the reference count of a pointer by one. This macro also sets the pointer to NULL. NS_IF_RELEASE has no effect when the pointer is NULL. This macro should only be used when the pointer might be NULL; otherwise, use NS_RELEASE.

    NS_IF_RELEASE is exactly equivalent to the following function:

    inline void NS_IF_RELEASE(nsISupports* foo)
    {
      if (foo)
        foo->Release();
      foo = 0;
    }
    

    Syntax

    NS_IF_RELEASE(foo);
    

    See Also

    NS_ADDREF, NS_RELEASE

    Document Tags and Contributors

    Contributors to this page: Ehsan, Editmonkey, Biesi, Waldo
    最終更新者: Waldo,