We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

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: teoli, Nickolay, cbiesinger
Last updated by: Nickolay,