Returning strings from a dll and freeing C strings

BlitzMax Forums/BlitzMax Programming/Returning strings from a dll and freeing C strings

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

The life time of the pointer itself is not an issue unless you are returning a reference to it.

As K says the logical analysis of your code is that the returned memory pointed to by the pointer is owned by the caller so logically it is up to the caller to delete it, a design which I don't particularly care for due to it's unsymmetrical nature.