Azathoth #1 The freeing of the string shouldn't be done by DLL if it was allocated by the main program, it has no idea if the program is still using the ptr.