WinForm app memory continually grows

J

J. Clay

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
 
G

Guest

J. Clay said:
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.
 
J

J. Clay

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top