473,385 Members | 2,044 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,385 software developers and data experts.

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 1413
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.(Inherited from MarshalByValueComponent.)
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**************@TK2MSFTNGP14.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.(Inherited from MarshalByValueComponent.)
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
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...
4
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,...
23
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
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...
20
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
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...
53
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...
9
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...
10
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...

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.