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.

I found a few spots where I was attempting to MemFree the pointer returned to the main program. Removing those errors fixed everything.

Again, I believe returning a local variable is a no-no here. For example, in PureBasic you had to return a global variable, because the moment the function exits, that variable no longer exists. It is probably still there, and will probably still work most of the time, but it will cause random memory errors here and there.