473,651 Members | 2,546 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

WinForm app memory continually grows


Developing in VS 2005

I have WinForm app that utilizes several class objects and is databound to a
couple of objects. One of the classes uses a timer to query an in memory
database every second for changes (Calls from an external application).

I am not sure if this has anything to do with it, but for some reason, the
memory usage goes up about 160K just about every second (watching in Task
Manager).

Is there someplace that I can look to see why it continues to grow, even
when the form is just sitting there.

Any common issues I should be looking at?

TIA,
Jim

Mar 30 '06 #1
2 1420
J. Clay wrote:

Developing in VS 2005

I have WinForm app that utilizes several class objects and is databound to a
couple of objects. One of the classes uses a timer to query an in memory
database every second for changes (Calls from an external application).

I am not sure if this has anything to do with it, but for some reason, the
memory usage goes up about 160K just about every second (watching in Task
Manager).

Is there someplace that I can look to see why it continues to grow, even
when the form is just sitting there.

Any common issues I should be looking at?

TIA,
Jim


1. It would help to see your code.

2. It would be far better to attach the DataTable events to know when a
change happens instead of your timer, which is probably causing you
memory to grow. The memory would eventually level off, but the GC
doesn't see the need to clean up the extra memory as fast as you think
it would. It would clean it up when the system needed the resources.

ColumnChanged Occurs after a value has been changed for the specified
DataColumn in a DataRow.
ColumnChanging Occurs when a value is being changed for the specified
DataColumn in a DataRow.
Disposed Adds an event handler to listen to the Disposed event on the
component.(Inhe rited from MarshalByValueC omponent.)
Initialized Occurs after the DataTable is initialized.
RowChanged Occurs after a DataRow has been changed successfully.
RowChanging Occurs when a DataRow is changing.
RowDeleted Occurs after a row in the table has been deleted.
RowDeleting Occurs before a row in the table is about to be deleted.
TableCleared Occurs after a DataTable is cleared.
TableClearing Occurs when a DataTable is cleared.
TableNewRow Occurs when a new DataRow is inserted.
Mar 30 '06 #2

Thanks for the info.

I did do some more research and found that I shouldn't really look at the
task manager. I played around with things and did find that memory did get
released at some point.

On your Point 2 - Because of my requirements for external app integration
the In Memory DB is not a DataTable. It is an actual 3rd party object that
allows for other non-.Net apps to share the data.

Thanks again

"I Don't Like Spam" <no@spam.com> wrote in message
news:Or******** ******@TK2MSFTN GP14.phx.gbl...
J. Clay wrote:
Developing in VS 2005

I have WinForm app that utilizes several class objects and is databound
to a couple of objects. One of the classes uses a timer to query an in
memory database every second for changes (Calls from an external
application).

I am not sure if this has anything to do with it, but for some reason,
the memory usage goes up about 160K just about every second (watching in
Task Manager).

Is there someplace that I can look to see why it continues to grow, even
when the form is just sitting there.

Any common issues I should be looking at?

TIA,
Jim


1. It would help to see your code.

2. It would be far better to attach the DataTable events to know when a
change happens instead of your timer, which is probably causing you memory
to grow. The memory would eventually level off, but the GC doesn't see
the need to clean up the extra memory as fast as you think it would. It
would clean it up when the system needed the resources.

ColumnChanged Occurs after a value has been changed for the specified
DataColumn in a DataRow.
ColumnChanging Occurs when a value is being changed for the specified
DataColumn in a DataRow.
Disposed Adds an event handler to listen to the Disposed event on the
component.(Inhe rited from MarshalByValueC omponent.)
Initialized Occurs after the DataTable is initialized.
RowChanged Occurs after a DataRow has been changed successfully.
RowChanging Occurs when a DataRow is changing.
RowDeleted Occurs after a row in the table has been deleted.
RowDeleting Occurs before a row in the table is about to be deleted.
TableCleared Occurs after a DataTable is cleared.
TableClearing Occurs when a DataTable is cleared.
TableNewRow Occurs when a new DataRow is inserted.


Apr 3 '06 #3

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

Similar topics

11
1683
by: EDom | last post by:
Hi, I have aspnet_wp.exe with increasing on every postback and not every revisit to any page. Even if I clear session and close the browser it remains in the memory. I have only one connection object and it is closed always as I have it under try catch, and all my variables are disposed at the end of each function. What could be the issue?? Regards, Vineet
4
1297
by: wg | last post by:
Can someone help me with this. I have a application in which a timer runs all the time. I set some flags in side the timer so there is nothing inside to cause a problem. However if I run the app, it continually grows in memory. If I leave it long enough it will eventually grow out of control How can I deal with this? Thanks wg
23
4543
by: James | last post by:
The following code will create memory leaks!!! using System; using System.Diagnostics; using System.Data; using System.Data.SqlClient; namespace MemoryLeak
3
3754
by: Florin | last post by:
Hi all, I have a problem related to memory grow on a server application which is basically stateless (I have some static info loaded). The client accesses this server using remoting and it has worked for about 2 years without problems. The problem I have encountered lately is that the memory on server side started to grow and not to be released. I have checked first new functionalities but after isolating these on separate server, the...
20
9346
by: mariano.difelice | last post by:
Hi, I've a big memory problem with my application. First, an example: If I write: a = range(500*1024) I see that python process allocate approximately 80Mb of memory.
0
1471
by: Jose Garcia | last post by:
Hello, I am programming an OpenCV application which uses some 40MB images. The problem comes when in every loop, the virtual memory grows 100MB... so... it crash at the 10th loop + or -. I know I have to release the images after use them... but virtual memory grows and grows up ever. Can I see which objects/variables are instanced every moment? Or...
53
26363
by: fdmfdmfdm | last post by:
This is an interview question and I gave out my answer here, could you please check for me? Q. What are the memory allocation for static variable in a function, an automatic variable and global variable? My answer: static variable in function and global variable are allocated in head, and automatic variable is allocated in stack. Right?
9
4205
by: jeungster | last post by:
Hello, I'm trying to track down a memory issue with a C++ application that I'm working on: In a nutshell, the resident memory usage of my program continues to grow as the program runs. It starts off at a nice 4% of memory, then slowly grows up to 50% and beyond. This translates to around 2 gigs of physical memory, and that's really way more memory than this program should be taking up.
10
4412
by: swornavidhya.mahadevan | last post by:
Which allocation (Static / Dynamic) is suitable for the situation when we are trying to allocate for a overloaded memory when the memory is full and no space to allocate. What will happen if both the allocation is impossible. Sworna vidhya
0
8275
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
8792
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
8571
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...
0
7294
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6157
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
4143
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...
0
4280
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2696
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
1585
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.