This commit is contained in:
2025-05-13 02:46:21 +03:00
parent 143e16692e
commit 86914b7fcc
610 changed files with 92343 additions and 2 deletions
+22
View File
@@ -0,0 +1,22 @@
#ifndef COM_H__
#define COM_H__
#include "log/NLog.h"
#define PPCAT_NX(A, B) A ## B
#define PPCAT(A, B) PPCAT_NX(A, B)
#define SAFE_RELEASE(__PTR___) \
if(__PTR___ != nullptr)\
(__PTR___)->Release(); \
#define FINAL_RELEASE(__PTR___) \
if(__PTR___ != nullptr) {\
auto __PTR___##release_return_val = (__PTR___)->Release(); \
if(__PTR___##release_return_val != 0) {\
LogInfo() << PPCAT("Final release failed on object ", #__PTR___) << " Refcount now = " << __PTR___##release_return_val; \
}}
#endif