fxg4758 Posted February 7, 2009 Posted February 7, 2009 Hi all. I create this function to work in a site, but when i call the function, the memory of app will increase in 10 mega +/-, and after i close the form, the app have the same increase. Can someone tell what is wrong with this code? Thanks for any information. Func FAV() $width = "1024" $height = "768" _IEErrorHandlerRegister() $oIE = _IECreateEmbedded() GUICreate("Test", $width, $height, _ (@DesktopWidth - $width) / 2, (@DesktopHeight - $height) / 2, _ $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $GUIActiveX = GUICtrlCreateObj($oIE, 0, 0, $width, $height) GUISetState() _IENavigate($oIE, "http........") $o_form = _IEFormGetObjByName($oIE, "Form") $o_login = _IEFormElementGetObjByName($o_form, "username") $o_password = _IEFormElementGetObjByName($o_form, "password") $smslogin = IniRead("g.ini", "sms", "login", "Not found") $smspass = IniRead("g.ini", "sms", "password", "Not found") _IELoadWait($oIE) _IEFormElementSetValue($o_login, $smslogin) _IEFormElementSetValue($o_password, $smspass) Sleep(600) _IEFormImageClick ($oIE, "bot_oknew.gif", "src") _IENavigate($oIE, "http......") While 1 $smg = GUIGetMsg() Select Case $smg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd GUIDelete() EndFunc
Authenticity Posted February 7, 2009 Posted February 7, 2009 Get used to it... Microsoft objects is some giant class with interfaces and sub-classes and after you're creating a reference to the object it's in the address space of your application so the memory your application is consuming is mostly from the object. Delete the object reference and your application supposed to free this memory, like: $oIE = 0
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