26 Jul
2005
26 Jul
'05
3:37 a.m.
"James Hawkins" <truiken(a)gmail.com> wrote:
+#define HH_Alloc(size) ((LPVOID)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size)) + +#define HH_Free(buffer) \ + if (buffer) \ + HeapFree(GetProcessHeap(), 0, (HLOCAL)buffer);
Alot of work has been done to avoid tests for NULL before HeapFree call, please do not introduce them again. Personally I don't see the point of HH_Alloc and HH_Free macros at all.
+#define HH_SafeRelease(x) \ + if (x) \ + { \ + x->lpVtbl->Release(x); \ + x = NULL; \ + }
Again, a direct access to a vtable. There is no much point in that macro either, do that check directly instead and get rid of hhctrl.h completely. -- Dmitry.
7441
Age (days ago)
7441
Last active (days ago)
0 comments
1 participants
participants (1)
-
Dmitry Timoshkov