mirror of
https://github.com/zeldaret/botw
synced 2026-08-17 05:01:25 -04:00
ksys/util: Add safeDeleteHeap
This commit is contained in:
@@ -27,4 +27,11 @@ inline void safeDeleteThread(T*& thread, bool is_jam = false) {
|
||||
safeDelete(thread);
|
||||
}
|
||||
|
||||
inline void safeDeleteHeap(sead::Heap*& heap) {
|
||||
if (heap) {
|
||||
heap->destroy();
|
||||
heap = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace ksys::util
|
||||
|
||||
Reference in New Issue
Block a user