diff options
author | Chris Robinson <[email protected]> | 2013-05-25 21:04:00 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2013-05-25 21:04:00 -0700 |
commit | 6571d805400f018b51835a8e37752409af9b1c4d (patch) | |
tree | 83cbbb263ca40d19fe25252c9d62400fc61d90c9 /OpenAL32/Include/alMain.h | |
parent | 2da6caeaa61338ccbea9a7cbc022be932bb4e0e1 (diff) |
Use a Delete method for deletable objects
Diffstat (limited to 'OpenAL32/Include/alMain.h')
-rw-r--r-- | OpenAL32/Include/alMain.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index ca0df2ad..a7c79b2a 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -70,7 +70,10 @@ static const union { #define SET_VTABLE1(T1, obj) ((obj)->vtbl = &(T1##_vtable)) #define SET_VTABLE2(T1, T2, obj) SET_VTABLE1(T1##_##T2, STATIC_CAST(T2, (obj))) -#define DELETE_OBJ(obj) ((obj)->vtbl->getCreator()->vtbl->destroy((obj))) +#define DELETE_OBJ(obj) do { \ + (obj)->vtbl->Destruct((obj)); \ + (obj)->vtbl->Delete((obj)); \ +} while(0) #ifdef _WIN32 |