Jump to content

GUI memory usage


JackDinn
 Share

Recommended Posts

iv noticed that if i have a little GUI come up to notify the user of something or other that when i delete the GUI i dont get the memory back? i found that if i minimize it first and then delete it i do ?

now what iv had to do is to minimize all my GUI's before either putting them in the tray (@SW_HIDE)ing them if they are supposed to continue running in the background and the same for popup notification GUI's i cant just delete them as the memory usage remains the same so i minimize them and then delete them, it works, i get the memory usage back but it has a side affect, sometimes the mere fact that im minimizing a non active GUI steals focus for a second and causes problems, i would like to find a way not to have do this minimizing of my GUI's before i can hide/delete them.

Any1 any idea's?

try it out, make a GUI watch the mem usage then have a button to hide/delete it, the mem usage stays the same. now try minimizing it first !

any help is most appreciated, thx

Thx all,Jack Dinn.

 

JD's Auto Internet Speed Tester

JD's Clip Catch (With Screen Shot Helper)

Projects :- AutoIt - My projects

My software never has bugs. It just develops random features. :-D

Link to comment
Share on other sites

ok found the answer in the end, i did search "GUI memory minimize" but couldn't find an answer.

anyhow i found it here http://www.autoitscript.com/forum/index.ph...mp;#entry133769 by trolling through all the post and just stumbled across it.

Edited by JackDinn

Thx all,Jack Dinn.

 

JD's Auto Internet Speed Tester

JD's Clip Catch (With Screen Shot Helper)

Projects :- AutoIt - My projects

My software never has bugs. It just develops random features. :-D

Link to comment
Share on other sites

ok found the answer in the end, i did search "GUI memory minimize" but couldn't find an answer.

anyhow i found it here http://www.autoitscript.com/forum/index.ph...mp;#entry133769 by trolling through all the post and just stumbled across it.

What was it you found? The link you gave doesn't tell us.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

aye it's a bit of a hunt init ,

; Reduce memory usage
; Author wOuter ( mostly )

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()

well worked a treat for me anyhow :P

Thx all,Jack Dinn.

 

JD's Auto Internet Speed Tester

JD's Clip Catch (With Screen Shot Helper)

Projects :- AutoIt - My projects

My software never has bugs. It just develops random features. :-D

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...