On 12/3/2013 9:31 PM, John Colvin wrote:
You should be fine to free in that way as long as you haven't done anything crazy like separately static linking libc.
I wouldn't advise this in the general case. When you have complete end-to-end control, sure. But if, for example, you're using a dynamic binding to load a shared library, all bets are off. Most likely on Linux and Mac you'll be fine. But on Windows, the shared lib could have been compiled with DMC, GCC, MSVC, or who knows what else.