473,803 Members | 3,448 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

.net not releasing memory

19 New Member
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 2847
PRR
750 Recognized Expert Contributor
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
bulinckx
1 New Member
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
3051
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 Unix/Windows. Why use Python? End user flexibility. So far it seems that (on Windows): (1) memory increases when you import <module>. Expected behaviour. (2) memory does not release when you del <module>. Why not? Is Python
7
25984
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 increased. So what i want is as soon as i am setting dataset to null, memory should be released. But when i am looking into task manager for memory useage what i am
2
2212
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 recycled. How do I get it so that the memory is released when no longer needed? I have tries setting up memory recycling at a lower limit than the defaults, but it recycles way too much slowing down the webs. Here is my setup:
8
12048
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 all the data I thought with: MyDataSet.Tables("MyTable1").Rows.Clear() MyDataSet.Tables("MyTable2").Rows.Clear() MyDataSet.Tables("MyTable3").Rows.Clear() But I'm monitoring the memory the process is doing and this isn't freeing the memory. Is...
5
9193
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 which fetches data out of a mySQL database, interrogates each row individually and takes various actions accordingly. It can fetch upwards of 300,000 rows, each of which vary between 1k and 2k in size, making the resulting DataSet object almost...
12
3163
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 to produce a relatively small data structure that sits in a C extension. The Python objects consume quite a bit of memory. 2) Releases all the Python objects.
3
1569
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 to the memory. If this can occur then it introduces an error that would only occur at random times. Is this really a problem or does .NET take the necessary steps to ensure the memory is first referenced by the calling function before the...
5
3152
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 usage of DB2 returns to x. However, sometimes after running the load test the memory usage does not drop down to x right away; sometimes it takes a few hours. This "problem" exists with their current live version of the software, and the version we...
1
2247
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. As per my observation during these operations,memory keep on allocating on heap and never release untill Garbage collector gets called by system. I also set all the objects to nothing after its use, but still it is not releasing the memory. Can...
0
9703
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9564
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10316
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10069
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7604
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6842
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5500
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4275
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2970
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.