Terminating a VB program (objects still in memory?) 
Author Message
 Terminating a VB program (objects still in memory?)

Hello,

I am changing the way my program terminates.
AND NOW IT WONT TERMINATE!!!

My understanding is that a VB program terminates when there are no forms
or global objects still in memory.

So I set all my global objects = Nothing
and ...
For Each frm In Forms
  If frm.Name <> Me.Name Then Unload frm
Next
Unload Me

Then the program just sits there,
doing nothing,
still loaded.

Running in the IDE, I can hit End (or pause)
and I get control back.

Any ideas what I am doing wrong?
Any ideas how I can find the object(s) still in memory I may have missed?
Any other ideas?

Thanks
Greg



Mon, 15 Mar 2004 09:47:34 GMT  
 Terminating a VB program (objects still in memory?)
On Thu, 27 Sep 2001 11:47:34 +1000, "Greg Harris"

Quote:

>and ...
>For Each frm In Forms
>  If frm.Name <> Me.Name Then Unload frm

Any of your  form's have anything in their queryunload, unload, etc..
events ?

Regards, Frank



Mon, 15 Mar 2004 10:29:22 GMT  
 Terminating a VB program (objects still in memory?)
Watch the Teminate Event in each of your forms - also Classes and
Usercontrols.



Quote:
>On Thu, 27 Sep 2001 11:47:34 +1000, "Greg Harris"

>>and ...
>>For Each frm In Forms
>>  If frm.Name <> Me.Name Then Unload frm

>Any of your  form's have anything in their queryunload, unload, etc..
>events ?

>Regards, Frank



Wed, 17 Mar 2004 20:53:35 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Reset memory and Object values without ending VB.6 program

2. VB 4.0 app stays in memory when terminated

3. Virtual memory doesn't reclaim memory from VB program

4. Outlook stays open after VB program terminates

5. How do you properly terminate a VB program?

6. Terminating another Program via VB

7. Terminating DOS program from VB

8. terminate a vb program from taskmgr

9. Terminating VB program

10. Terminate excel object via vb

11. User control not terminating (Staying in memory)

12. Vb5 not terminating (memory hogging)

 

 
Powered by phpBB® Forum Software