Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Memory loss when running EMPTY vb6 program


Message #1 by "SunnyCat" <mstrblstrprdctns@h...> on Sun, 1 Dec 2002 12:17:49
When you say 'close it' you mean you just close that form or the 
whole application?
When a form is open, the VB run time allocates some resources for it,
resources that are not removed until the form is destroyed, typically
when the application ends. To be sure to free all memory, never use
the default project forms, but always create new ones that you can 
delete when you want, e.g:

dim frx as Form1
set frx = new form1
frx.show
....and when you are done
set frx = nothing

I am not familiar with w98 anyway (lucky me) ...

Marco

> hi
> I have vb6 on a w98 with sp4 & sp5 installed
> When I start a new project, compile it, close the 
d> eveloper, check my memory,
> RUN the EMPTY form, close it, check my memory, and, huh?
a> bout 50 kb of memory is GONE (leaked??)
> Note: the form is empty. There is no code in it. 
> Why , WHY is memory leaking ... on an empty form>?????

  Return to Index