Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Memory leak in VB.net? Need an expert!!!

Status
Not open for further replies.

benlinkknilneb

Programmer
May 16, 2002
590
US
Hey all,

I'm writing a statistical package that pulls information from our plant's database. My reporting mechanism is Crystal. All my data is stored in an Access Database and moved to ADO.NET datasets for intermediate stuff.

I've noticed that my RAM is not being freed after I close down a form. The program has several subsections. When I load one of them, the memory is allocated to hold datasets and stuff, but when I click the 'x' box to close the form, the memory being used by the application does not shrink back to its original size (I'm using the WinNT Task Manager to see this).

In C/C++, any memory allocated with malloc() had to be cleared by using free(), and memory allocated by new had to be freed with delete. Does VB have a stipulation like that? I was under the impression that VB destroyed variables when they went out of scope.
 
It can occur pretty much whenever anything happens to the grid. For instance, I've seen it happen when the grid is populated, a row is selected, a cell is clicked, tabbing from cell to cell, clearing the grid, or simply typing in a cell.

 
The link below documents the problem to a certain degree by says it relates only to moving through master-detail grids. I was able to confirm with MS this was a more wide ranging problem with the datagrid; the KBase article does explain whats happening.

In my case I wasn't using any hierarchical data in the grids, just binding to single tables. The proposed fix did not work at all. The processor spikes/hangs still occurred. In the end I switched to the Infragistics grid control which seems to be working out fine.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top