Jump to content

Recommended Posts

Posted

So question for you guys, I wrote an app and it seems to be working well but I feel like I have a memory leak somewhere?

Idle the program is using ~70mbs of memory but no CPU usage. Is this going to cause problems for any of my users?

Here is a link to the program Download Link

MCR.jpg?t=1286371579

  Reveal hidden contents

Most recent sig. I made

Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic

Posted (edited)

not 70mb ..

let me fix you, 220mb+

This is probably related internet explorer

Maybe with the latest IE version will be less memory leak.

Maybe try to use my method to create IE frame.

My method will create IE frame with latest IE version.

when you use _IECreateEmbedded you actually using up to IE 7.

 

Try this:

'?do=embed' frameborder='0' data-embedContent>>

Edited by Guest
Posted

Sorry MBALZESHARI, didn't think it'd be a big issue.

And odd gil, I only experience 70 from mine at any given time. I'll look into that.

@ MBALZESHARI

  Reveal hidden contents

MCR.jpg?t=1286371579

  Reveal hidden contents

Most recent sig. I made

Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic

Posted

Damein,

The loop only needs to have Sleep in it as the tab control does fire an event and thus reading the tab control in the loop is just using extra resources for no good reason that I can observe with testing.

Here is code I would use as a replacement

GUICtrlSetOnEvent($TabList, "_TabChange")
;...
While 1
    Sleep(10)
WEnd

Func _TabChange()
    Dim $oIE, $TabList
    Local Static $TabMain = 0, $TabRecorded = 0
    ; get current tab
    Local $TabCurrent = GUICtrlRead($TabList)
    ; check if current tab is main tab
    If $TabCurrent = $TabMain Then
        ; if main tab (current) is not same as recorded then use _IENavigate
        If $TabRecorded <> $TabMain Then _IENavigate($oIE, "http://www.twitch.tv/directory")
    Else ; if current tab is not main tab
        ; only use _IENavigate if recorded is main tab
        If $TabRecorded = $TabMain Then _IENavigate($oIE, "about:blank")
    EndIf
    ; record current tab
    $TabRecorded = $TabCurrent
EndFunc

Notice the "about:blank" navigation used instead of "blank". The "blank" causes a incorrect address timeout and slows down the code. The "about:blank" is instant with no slowdown. The tab change event seems reasonable to me and the loop looks quite sleepy now.

You do have a label overlapping the tabs and you do have list box controls going below the tab control on Windows 7 here. Not major concerns though you may want to correct them.

The script uses quite some memory as you mentioned but seems quite stable e.g. no rises of memory consumption outside of expected range that I noticed. You can take that as a compliment. :)

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
  • Recently Browsing   0 members

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