diff options
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__ */ |