473,785 Members | 2,761 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Memory issues

Hi,

I'm having several memory leaks in my Windows Form (C#). Testing, I
found a curious thing:

Put a ListView control in a Windows Form, run the project and start the
TaskManager. Each time you focus the form or pass the mouse in/out the
ListView, the memory used by the application increases. And, besides that,
the start memory used is about 12MB. Isn't that a little big? Word uses
about 8MB.

Is this a Garbage Collector problem, or later this resources will be
collected? Or, this is a internal problem of the ListView control?

Thanks.
Bruno Rodrigues.
São Paulo SP, Brasil.
Nov 16 '05 #1
1 1208
This is by design. If no other app requires memory, an application reserves
a big portion for itself. When another app asks the system for memory and
there is not enough remaining, windows takes it from other apps which does
not require it at the moment. Also, as you noticed, applications which does
not have the input focus (background applications) will get less memory from
the system.

--
cody

[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk
"Bruno Rodrigues" <br*********@si plan.com.br> schrieb im Newsbeitrag
news:eu******** ******@TK2MSFTN GP09.phx.gbl...
Hi,

I'm having several memory leaks in my Windows Form (C#). Testing, I
found a curious thing:

Put a ListView control in a Windows Form, run the project and start the TaskManager. Each time you focus the form or pass the mouse in/out the
ListView, the memory used by the application increases. And, besides that,
the start memory used is about 12MB. Isn't that a little big? Word uses
about 8MB.

Is this a Garbage Collector problem, or later this resources will be
collected? Or, this is a internal problem of the ListView control?

Thanks.
Bruno Rodrigues.
São Paulo SP, Brasil.

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
6681
by: Tron Thomas | last post by:
Given the following information about memory management in C++: ----- The c-runtime dynamic memory manager (and most other commercial memory managers) has issues with fragmentation similar to a hard drive file system. Over time, the more often use call new/delete or alloc/free, there will be gaps and fragments in the heap. This can lead to inefficient use of available memory, as well as cache-hit inefficiencies.
29
4408
by: keredil | last post by:
Hi, Will the memory allocated by malloc get released when program exits? I guess it will since when the program exits, the OS will free all the memory (global, stack, heap) used by this process. Is it correct?
25
2388
by: Zeng | last post by:
I finally narrowed down my code to this situation, quite a few (not all) of my CMyClass objects got hold up after each run of this function via the simple webpage that shows NumberEd editbox. My memory profile shows that those instances survive 3 rounds of GC collections - it's not what I expected. In my real code, CMyClass occupies big amount of memory and they all share one stance of another class that I don't have enough memory hold...
4
1864
by: Simon Johnson | last post by:
Dear All, I have decided to take the big plunge and drop the Microsoft platform and use Mod_Python and Apache in it's place. I've never used Linux before this project so it's a really big learning curve, but so far it's going well. I've managed to create some simple pages using the basic of Python. One of the questions I have is: How do you cache stuff in memory? Say
14
4073
by: Joe | last post by:
I'm trying to track down where objects are referenced because I want to clean up the memory when I'm done with them. I thought I found all references but it doesn't seem that way because calling GC.Collect() doesn't free very much. I ran the built-in profiler and I get a warning: "An abnormal percentage of objects were collected in generation 2, which is inefficient. Investigate further by using the Objects Lifetime view." The top 3...
2
1661
by: ruca | last post by:
Hi gurus, Can anyone tell me please when I really must setup the value of memory that aspnet_wp or w3wp must use in IIS server machine? What I mean is that we have clients that have diferent specificatiosn in their server machines that have IIS to runnning WebApplications. This can change for example in RAM memory that is available. One have 1GB, other 2GB and another 4GB. I.e., how can I know when I must change any configuration in...
5
1106
by: Frank Rizzo | last post by:
Hello, I have a very frustrating issue I've been working on. I have a routine that does the following: 1. Load a large (declared local to the function) DataSet from the database. It contains 5 tables. 2. Load the database into a fairly complicated object model. 3. I dispose of the Dataset. Before loading the DataSet the MemUsage column in Task Manager shows 44 MB. After loading the database the MemUsage stands at 59 MB. Thus I
3
3685
by: Sam Samson | last post by:
Can any-one recommend some good sites detailing how to code a simple memory profiler? How do they "look under the hood"? I built an uber simple service that tracks the process' memory but I need to "get inside" and look a bit deeper and I don't have a clue where to start ... a commercial memory profiler is not an option due the nature of the environment the application is deployed in .. My app runs fine for weeks (in 8 locations) but...
5
12649
by: Max2006 | last post by:
Hi, What is the limit for memory that a .NET process or AppDomain can use? Thank you, Max
22
9365
by: Peter | last post by:
I am using VS2008. I have a Windows Service application which creates Crystal Reports. This is a multi theaded application which can run several reports at one time. My problem - there is a memory leak someplace. I can not detect the memory leak by running several reports by hand, but when I run tha app as a servrice and process few hundred reports there is significant memory leak. The application can consume over 1GB of memory where it...
0
9481
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
10336
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10155
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...
1
10095
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9953
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
7502
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
5383
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
4054
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
2
3655
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.