"GlobalAlloc" versus "malloc" versus "new"
Posted on 2004-08-31
I have a large program dating back to Windows 3.1, and as such it contains many GlobalAllocs. Recently the locking and unlocking of memory has gotten a bit cumbersome and I'd like to replace it.
Unfortunately the program is rather large, and I can't just say "it's getting hard to keep track of what memory handles are locked in this spagetti-code" to management. Is there a good reason to not use it? It seems under Win32 it offers no real advantage (backwards compatability is not an issue -- it won't even run under Win95 anymore) and way too much hassle.
I will also accept "For shame, GlobalAlloc is much better because . . ." arguments, provided the ". . ." is filled in.