jaxman Posted July 28, 2005 Share Posted July 28, 2005 Is it possible to free up the memory that the compiled script used Link to comment Share on other sites More sharing options...
GaryFrost Posted July 28, 2005 Share Posted July 28, 2005 add this function to your script and call the function Func _ReduceMemory($i_PID = -1) If $i_PID <> -1 Then Local $ai_Handle = DllCall("kernel32.dll", 'int', 'OpenProcess', 'int', 0x1f0fff, 'int', False, 'int', $i_PID) Local $ai_Return = DllCall("psapi.dll", 'int', 'EmptyWorkingSet', 'long', $ai_Handle[0]) DllCall('kernel32.dll', 'int', 'CloseHandle', 'int', $ai_Handle[0]) Else Local $ai_Return = DllCall("psapi.dll", 'int', 'EmptyWorkingSet', 'long', -1) EndIf Return $ai_Return[0] EndFunc;==> _ReduceMemory() SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
jaxman Posted July 28, 2005 Author Share Posted July 28, 2005 This is a good script but this is actually not what i'm looking for but thanx anyway. Link to comment Share on other sites More sharing options...
GaryFrost Posted July 28, 2005 Share Posted July 28, 2005 If you mean after the script has exited, I have utility that runs on my pc's calledFreeRam XP Pro SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
seandisanti Posted July 28, 2005 Share Posted July 28, 2005 If you mean after the script has exited, I have utility that runs on my pc's calledFreeRam XP Pro<{POST_SNAPBACK}>is this a problem with autoit? memory not being automatically freed up? Just asking 'cause i hadn't noticed it before, but honestly never really looked either Link to comment Share on other sites More sharing options...
jaxman Posted July 28, 2005 Author Share Posted July 28, 2005 If you mean after the script has exited, I have utility that runs on my pc's calledFreeRam XP Pro<{POST_SNAPBACK}>There are lots of freeware utilities that does this but was wondering if it's possible with Autoit. Link to comment Share on other sites More sharing options...
GaryFrost Posted July 28, 2005 Share Posted July 28, 2005 is this a problem with autoit? memory not being automatically freed up? Just asking 'cause i hadn't noticed it before, but honestly never really looked either<{POST_SNAPBACK}>I haven't either, but I use that for alot of other applications i.e. MS apps leave foot prints all over the place. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
GaryFrost Posted July 28, 2005 Share Posted July 28, 2005 Should make correction to that, if using the beta and DllStructs, and one forgets to delete the structs the memory is still used. There may be other instances where incorrect coding will result in memory not being freed up. Gary SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
jaxman Posted July 28, 2005 Author Share Posted July 28, 2005 Should make correction to that, if using the beta and DllStructs, and one forgets to delete the structs the memory is still used. There may be other instances where incorrect coding will result in memory not being freed up.Gary<{POST_SNAPBACK}>You're right forgot about that, thanx Link to comment Share on other sites More sharing options...
seandisanti Posted July 28, 2005 Share Posted July 28, 2005 I haven't either, but I use that for alot of other applications i.e. MS apps leave foot prints all over the place.<{POST_SNAPBACK}>Microsoft programs wasting system resources?! Blasphemy. </sarcasm> Thanks for the response, i hadn't even considered possible side effects of not deleting structs etc, but luckily i don't use them much... 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