Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / CreateDeleteString in the GlobStruct

Author
Message
D Ogre
20
Years of Service
User Offline
Joined: 19th Nov 2003
Location:
Posted: 6th Apr 2011 00:18
Do we actually need to use this function from the Globstruct when passing in strings from our plugin functions?
Brendy boy
18
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 6th Apr 2011 23:56
this is what i use



D Ogre
20
Years of Service
User Offline
Joined: 19th Nov 2003
Location:
Posted: 8th Apr 2011 22:09 Edited at: 8th Apr 2011 22:58
I wasn't asking how to use it. I was asking if we had to. Meaning... Is it safer to use to protect against memory leaks upon program termination.
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 10th Apr 2011 01:07
There are no memory leaks at program termination - all memory allocated is automatically freed at that point.

During the program runtime however, you won't necessarily leak memory, but you could certainly corrupt the memory heap and cause a crash - memory you allocate in your DLL can be freed by the DBPro runtime, and memory the DBPro runtime allocates can be freed by your DLL. This mixing of memory from different heaps is a no-no.

Bottom line: You should use the function provided. That's why it's provided.

D Ogre
20
Years of Service
User Offline
Joined: 19th Nov 2003
Location:
Posted: 10th Apr 2011 02:57
That makes sense. Thanks for clearing that up for me.

Login to post a reply

Server time is: 2024-03-29 12:25:04
Your offset time is: 2024-03-29 12:25:04