This commit is contained in:
dveditz%netscape.com 1999-06-16 03:28:25 +00:00
Родитель de1c9d7762
Коммит 43eb020a43
2 изменённых файлов: 36 добавлений и 0 удалений

Просмотреть файл

@ -607,6 +607,24 @@ NS_IMETHODIMP _class::QueryInterface(REFNSIID aIID, void** aInstancePtr) \
PR_END_MACRO
#endif
/**
* Macro for releasing a reference to an interface.
*
* Note that when MOZ_TRACE_XPCOM_REFCNT is defined that the release will
* be done before the trace message is logged. If the reference count
* goes to zero and implementation of Release logs a message, the two
* messages will be logged out of order.
*
* @param _ptr The interface pointer.
*/
#ifdef MOZ_TRACE_XPCOM_REFCNT
#define NS_RELEASE_THIS() \
nsTraceRefcnt::Release(this, Release(), __FILE__, __LINE__)
#else
#define NS_RELEASE_THIS() \
Release()
#endif
/**
* Macro for releasing a reference to an interface, except that this
* macro preserves the return value from the underlying Release call.

Просмотреть файл

@ -607,6 +607,24 @@ NS_IMETHODIMP _class::QueryInterface(REFNSIID aIID, void** aInstancePtr) \
PR_END_MACRO
#endif
/**
* Macro for releasing a reference to an interface.
*
* Note that when MOZ_TRACE_XPCOM_REFCNT is defined that the release will
* be done before the trace message is logged. If the reference count
* goes to zero and implementation of Release logs a message, the two
* messages will be logged out of order.
*
* @param _ptr The interface pointer.
*/
#ifdef MOZ_TRACE_XPCOM_REFCNT
#define NS_RELEASE_THIS() \
nsTraceRefcnt::Release(this, Release(), __FILE__, __LINE__)
#else
#define NS_RELEASE_THIS() \
Release()
#endif
/**
* Macro for releasing a reference to an interface, except that this
* macro preserves the return value from the underlying Release call.