By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,041 Members | 1,018 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,041 IT Pros & Developers. It's quick & easy.

WinForm app memory continually grows

P: n/a

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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a

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 discussion thread is closed

Replies have been disabled for this discussion.