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.