mozilla

NS_ADDREF

Summary

Macro

Addrefs the argument. Do not use when the pointer might be null; use NS_IF_ADDREF in those cases.

NS_ADDREF(foo) is equivalent to

foo->AddRef();

This macro exists mainly for historical reasons, but for consistency and for symmetry with NS_RELEASE it should still be used.

Syntax

NS_ADDREF(foo);

See Also

NS_IF_ADDREF NS_RELEASE

Document Tags and Contributors

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