It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Visual Basic Forum

RAM usage and Unloading forms and components in VB6

Moderator: dafunkymunky

RAM usage and Unloading forms and components in VB6

Postby phoenixfury on Wed Jul 22, 2009 10:04 am

I am using VB6 and the following code:

Private Sub cmdBacktoMenu_Click()
Unload frmOne
Set frmOne = Nothing
Load frmMainMenu
frmMainMenu.Show
End Sub

When I load the compiled program in the MainMenu it is using 7Mb of RAM, when I navigate to frmOne it jumps to 126Mb(which is expected) however, when I click this command it goes back to MainMenu and is still using 64Mb of RAM. Why isn't it returning to near the 7Mb when it initates, as the information from frmOne should be discarded entirely.

Btw,I have a sound file array if anyone is wondering why the RAM usage is so high, I'd be guessing the components aren't being completely unloaded but don't know how to do so.
Thanks, any help much appreciated, Phoenix
phoenixfury
 
Posts: 1
Joined: Wed Jul 22, 2009 9:59 am

Who is online

Users browsing this forum: No registered users and 3 guests