Cyberworld Posted August 19, 2006 Share Posted August 19, 2006 The plugins seems to leak memory (Or are there a reason for that?)For example If I call the following function in a loop: $handle = PluginOpen("example.dll") for $x = 1 to 2500000 $retval = PluginAdd("10", "50") next PluginClose($handle)Everytime the loop repeats the used memory will increase, a few hundred k's.Another thing... Do I need to free small buffers if I have allocated like this:unsigned char pBuffer[32768];Should I use "AU3_FreeString()" to free this or will that be done automatically then the plugin is finished? Link to comment Share on other sites More sharing options...
Administrators Jon Posted August 19, 2006 Administrators Share Posted August 19, 2006 I'll check the code for a leak. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Cyberworld Posted August 19, 2006 Author Share Posted August 19, 2006 Great! ...and how about the other memory used? (My second question above). Link to comment Share on other sites More sharing options...
Administrators Jon Posted August 19, 2006 Administrators Share Posted August 19, 2006 Great!...and how about the other memory used? (My second question above).You only need to use FreeString when you've used GetString as in the PluginMsgBox example. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Administrators Jon Posted August 19, 2006 Administrators Share Posted August 19, 2006 I found the memory leak, it requires a new autoit3.exe and plugin_sdk, so it will be done in the next beta. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Cyberworld Posted August 19, 2006 Author Share Posted August 19, 2006 Excellent ..and thanks for taking your time to fix all those problems Link to comment Share on other sites More sharing options...
corz Posted April 13, 2013 Share Posted April 13, 2013 (edited) I am experiencing this behaviour with AutoIt 3.3.8.1 and the plugin SDK from 09-Jun-2009 on both 32 and 64 bit platforms. After five million function calls (that simply return) my app is using 400MB+ Is there a later SDK I should be using? ;o) Cor Edited April 13, 2013 by corz nothing is foolproof to the sufficiently talented fool.. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now