Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/guardedalloc')
-rw-r--r--intern/guardedalloc/MEM_guardedalloc.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/intern/guardedalloc/MEM_guardedalloc.h b/intern/guardedalloc/MEM_guardedalloc.h
index 958e5ae86cd..2a4ae5355a0 100644
--- a/intern/guardedalloc/MEM_guardedalloc.h
+++ b/intern/guardedalloc/MEM_guardedalloc.h
@@ -278,6 +278,15 @@ template<class T> inline void OBJECT_GUARDED_DESTRUCTOR(T *what)
} \
} \
(void)0
+# define OBJECT_GUARDED_SAFE_DELETE(what, type) \
+ { \
+ if (what) { \
+ OBJECT_GUARDED_DESTRUCTOR((type *)what); \
+ MEM_freeN(what); \
+ what = NULL; \
+ } \
+ } \
+ (void)0
#endif /* __cplusplus */
#endif /* __MEM_GUARDEDALLOC_H__ */