diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-05-03 18:42:08 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-05-03 19:04:47 +0300 |
commit | a5c89574a3f7e915dd3fe44a73f7f184ce1758e2 (patch) | |
tree | afe134ae4dc4869a9bca95aff01c8d6e87572f5c /intern/cycles/util/util_aligned_malloc.h | |
parent | 888852055c1b203f5a89c7e229f87f412a6624da (diff) |
Fix Cycles assert on exit after recent changes
Diffstat (limited to 'intern/cycles/util/util_aligned_malloc.h')
-rw-r--r-- | intern/cycles/util/util_aligned_malloc.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/intern/cycles/util/util_aligned_malloc.h b/intern/cycles/util/util_aligned_malloc.h index a76884b20a5..7115e4cb0c6 100644 --- a/intern/cycles/util/util_aligned_malloc.h +++ b/intern/cycles/util/util_aligned_malloc.h @@ -37,6 +37,14 @@ template<typename T> T *util_aligned_new() return new (mem) T(); } +template<typename T> void util_aligned_delete(T *t) +{ + if (t) { + t->~T(); + util_aligned_free(t); + } +} + CCL_NAMESPACE_END #endif /* __UTIL_ALIGNED_MALLOC_H__ */ |