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