Possible Duplicate:
malloc() vs. HeapAlloc()
I know we can use malloc
/free
in C to allocate/release heap memory, and use new
/delete
in C++ to do the similar things.
As for Windows, I occasionally saw people use HeapAlloc
etc APIs to allocate memory, which are the differences from the C/C++ counterparts?
And which is the best way to allocate a wchar_t
buffer on heap which will be used as input for some Windows APIs?