Link to home
Start Free TrialLog in
Avatar of smillerx
smillerx

asked on

VB4 Aplication Remains In Memory After Closing

I am developing some applications in VB Version 4.0 Standard.  After compiling and installing several of these on NT or 95 platforms, I have the following problem.  When terminating the program using the "close" button in the upper right corner, I find that the program closes but remains in memory.  One of my programs is a memory hog, so this becomes a real problem.  When it is launched several times in a session, it leaves an instance running for each launch, eventually running the system out of memory.  However, when I exit the program normally using an option on my menu, that instance of the application does not remain in memory.

I have searched the knowledgebase to no avail.  Please help me!
ASKER CERTIFIED SOLUTION
Avatar of Erick37
Erick37
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Correction to the sub:

Public Sub UnloadAllForms()
    Dim Form As Form
    For Each Form In Forms
        Unload Form
        Set Form = Nothing
    Next Form
End Sub