473,406 Members | 2,847 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

.net not releasing memory

Hi guys,
I have a memory problem in my vb.net application. It's actually a point of sales system, which must be keep running the whole day.
The problem is: application is not releasing any memory that it allocates for any resources.
When my application starts it loads a form say frmLogin, at this time the memory used by my application is for example 67K.
Now when user enters his credentials an MDI form is loaded, causing memory to increase upto 80K.
Now even when user closes the MDI form the memory doesnt decrease, between after closing MDI frmLogin is shown.

I have tried every thing, called .Dispose method, set MDI object to nothing but still of now use.
One thing i also mention here I am closing frmLogin when MDI is loaded and similary MDI is closed using .Close method after loading frmLoing.
Dec 2 '09 #1
2 2826
PRR
750 Expert 512MB
Are you having problems wrt to memory consumption? Garbage collection automatically manages memory. You can use dispose method for classes that implement IDisposable.
Dec 3 '09 #2
GC is automatic and like most automatic things its a litle dumb and sometimes needs a little help.

I found my app was wasting abou 400MB in memory holding a List<>. To release it I needed:
1. Explicit clear te object, if it is a list: myList.Clear(); myList = null;
2. Call the Garbage Collector: GC.Collet();

In fact most of times objects falls in a "grey area" where the GC cannot guess if it ill be referenced or not.
Exiting the block of code where myList lives dont free it and calling the GC ill not (immediatly) clean the memory. You must explicit "nullify" the object while inside scope (ie. inside te loop, if or method)! You can call the GC at any time after the object is correctly "nullified".
Jan 11 '12 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: lebo | last post by:
Hi I'm trying to understand how Python handles memory usage and dynamic object loading and unloading. Problem to solve? Build a very low memory footprint (non-GUI) Python application for...
7
by: trialproduct2004 | last post by:
Hi all I am having application in c# where i am loading one table of database into dataset. My table is of large size. so whenever i am loading that into dataset my memory size is getting...
2
by: M.Ob | last post by:
Hello... I am having issues with my asp.net apps not releasing memory. The memory usage for the process w3p.exe continues to grow to it's allowable limit and does not drop until the app pool is...
8
by: Sean | last post by:
I have a service that is pulling alot of records from a SQL Server table in a DataSet. This process takes up alot of memory, which is to be expected. But when the process is finished, I am clearing...
5
by: Mark Rae | last post by:
Hi, I'm encountering a strange phenomenon whereby a DataSet object is not releasing its memory when it's being disposed and/or set to Nothing. It is part of a Windows service written in VB.NET...
12
by: iker.arizmendi | last post by:
Is there any way to get Python to release memory back to the C allocator? I'm currently running a script that goes through the following steps: 1) Creates a very large number of Python objects...
3
by: ib | last post by:
ICloneable::Clone returns a new instance of the object being cloned. However, it seems possible that the garbage collector could release this memory before the calling function receives a reference...
5
by: Ian Boyd | last post by:
Customer is running a load test against a websphere application that uses DB2. While the load test is running the memory usage of DB2 climbs from x up to y. When the load test ends, the memory...
1
by: amollokhande1 | last post by:
Hi All, We have ASP.Net based content management web application. We are performing lots of XML based operations like setting the innerxml, loading the xml, string replace operations on XML etc....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.