Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

NS_IF_ADDREF

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

Summary

Macro

Addrefs the argument, if it is non-null. Does nothing for a null pointer. Only use this macro if the pointer might be NULL; use NS_ADDREF otherwise.

NS_IF_ADDREF(foo) is equal to

if (foo)
  foo->AddRef();

Syntax

NS_IF_ADDREF(foo);

See Also

NS_ADDREF

Document Tags and Contributors

 Contributors to this page: teoli, Nickolay, Biesi, Editmonkey
 Last updated by: Nickolay,