[+] __ROXTL_FORCE_SAFE_DESTROY_FORCE_CLEAR

This commit is contained in:
Reece Wilson 2023-07-24 04:50:21 +01:00
parent 6f13157ce3
commit 1905fcdf11

View File

@ -45,6 +45,12 @@ namespace AuUtil
constexpr inline bool AuHasPreDesconstruct_v = AuHasPreDeconstruct<T>::type::value;
}
#if !defined(__ROXTL_FORCE_SAFE_DESTROY_FORCE_CLEAR)
#define _AU_SAFE_DESTROY_FORCE_CLEAR(type) AuMemset(this, 0, sizeof(type));
#else
#define _AU_SAFE_DESTROY_FORCE_CLEAR(type) AuResetMember(*this);
#endif
#define AU_SAFE_DESTROY(type) \
public: \
virtual ~type() \
@ -60,6 +66,7 @@ public: \
\
type :: _TryDeconstruct<type>(this); \
\
_AU_SAFE_DESTROY_FORCE_CLEAR(type) \
} \
\
inline void Destroy() \