Memory, Memory and more Memory 
Author Message
 Memory, Memory and more Memory

As Mack Male, I have an application that uses tons of
memory, when the app starts uses 22.5 Mb, the user has a
login screen, inserts the username (app uses 0.3 Mb when
the user starts writting the username), inserts the
password and clicks the validate button (the app uses 3
more Mb) the login form unloads, I use the form.close and
form.dispose method, the memory?? 25.8Mb, the user
selects a catalog let's say the Clients catalog, the form
opens, 1.2Mb used, app memory = 27Mb, the user inserts
the data he needs, closes the form, app memory 27.2Mb and
I can continue the app uses up to 64 Mb or more and never
releases anything, I'm not using any unmanaged code,
everything is NET, no 3rd party controls, no VB6
controls, only NET, I'm using the dispose method for
every form, I have an ADO NET connection, the connection
gets a dispose after executing, the dataset get closed
after used, the reader gets closed.
So, what I'm missing??? what's wrong with VB???? what can
I implement in the app to release the memory and make the
app use only the memory requiered by the forms or
functions, I've tried every example found on the Internet
and Microsoft and the garbage collector is no working as
Microsoft says, I can't have an app that uses more that
24 Mb, I have a similar app in VB6 and uses only 19 Mb max
Please help me out with this
Thanks
RSV


Tue, 09 Nov 2004 06:54:37 GMT  
 Memory, Memory and more Memory
I experienced something simulary. What Microsoft doesn't
tell you is that it only destroys(read frees) the memory
when it checks the garbage collection for unreferenced
memory. This is something different then releasing all
memory when you exit a function.

You can trigger it by explicitly setting the object to
nothing.

I've also noticed that when you don't use the explicit
release, ending a debugging session can be heavy on memory
release, because at that time it starts releasing memory
you've allocated.

The main idea is though that the garbage collection is
implemented different in .NET then it was in VB6.

Maybe(i don't know ) there is a parameter you can define
so that the garbage collector starts checking at a certain
limit of memory use.

I hope this helped a bit.

Quote:
>-----Original Message-----
>As Mack Male, I have an application that uses tons of
>memory, when the app starts uses 22.5 Mb, the user has a
>login screen, inserts the username (app uses 0.3 Mb when
>the user starts writting the username), inserts the
>password and clicks the validate button (the app uses 3
>more Mb) the login form unloads, I use the form.close and
>form.dispose method, the memory?? 25.8Mb, the user
>selects a catalog let's say the Clients catalog, the form
>opens, 1.2Mb used, app memory = 27Mb, the user inserts
>the data he needs, closes the form, app memory 27.2Mb and
>I can continue the app uses up to 64 Mb or more and never
>releases anything, I'm not using any unmanaged code,
>everything is NET, no 3rd party controls, no VB6
>controls, only NET, I'm using the dispose method for
>every form, I have an ADO NET connection, the connection
>gets a dispose after executing, the dataset get closed
>after used, the reader gets closed.
>So, what I'm missing??? what's wrong with VB???? what can
>I implement in the app to release the memory and make the
>app use only the memory requiered by the forms or
>functions, I've tried every example found on the Internet
>and Microsoft and the garbage collector is no working as
>Microsoft says, I can't have an app that uses more that
>24 Mb, I have a similar app in VB6 and uses only 19 Mb max
>Please help me out with this
>Thanks
>RSV
>.



Fri, 12 Nov 2004 22:20:57 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. How i can get the Used Memory and Available Memory

2. Out of Memory Error & 64K memory limit

3. OLE Automation Problems - MEMORY HOG (Memory Leak?)

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

5. Memory? VB5.0 memory limitations

6. Shared Memory via Memory-Mapped Files

7. MEMORY Resources - GDI TOO HIGH - OUT OF MEMORY

8. memory (out of memory error)

9. memory leak in vitual memory

10. memory leak on vitual memory

11. Quality :: Loss memory :: Alocate/Free memory

12. Memory Leak -- Out of Memory

 

 
Powered by phpBB® Forum Software