List Info

Thread: RE: Memory leaks




RE: Memory leaks
country flaguser name
United States
2007-07-27 12:42:53
Take a look at the Using keyword introduced in version 2.0 of VB.NET:
 
 
 

John Warner

-----Original Message-----
From: David Douglass [mailto:dpdouggmail.com]
Sent: Friday, July 27, 2007 1:16 PM
To: aspnetaspadvice.com
Subject: [aspnet] Memory leaks

I use Excel quite a bit in my apps and I always close the instances and set them to nothing when I'm finished. But still the instances do not get cleaned up from the memory.
 
I do something like this when I'm done with the instance:
 
      book = Nothing
      sheet = Nothing
      range = Nothing
    app.Quit()
      app = Nothing

But it still seems that instances frequently stay in the memory. And when a number of instances stay open in the memory it starts creating annoyances for the user. ;Is there a way to clean this up in code or better yet, put in some code that does a better job of garbage collection?
 
--- List Settings --- http://aspadvice.com/lists/
--- List Settings ---
http://aspadvice.com/lists/
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )