PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
Memory usage of DataTable
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
Memory usage of DataTable
![]() |
Memory usage of DataTable |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Problem:
If a datatable has 100 rows and use 1 MB of memory and then i use the Clear() method and then i refill the datatable with 10 rows. The memory usage of the DataTable is still 1MB? The Clear method frees memory usage of the datatable? If i want to free the memory usage of the Datatable, i must destroy the DataTable and wait for the GC to collect that? By Simon. |
|
|
|
#2 |
|
Guest
Posts: n/a
|
Are you actually running out of memory or just watching the memory usage?
If you're not seeing a problem don't worry about it. If you don't tell the GC how to do its job, it won't tell you how to do yours. -- Chris Tacke Co-founder OpenNETCF.org Has OpenNETCF helped you? Consider donating to support us! http://www.opennetcf.org/donate "Simone" <simone.bonacin@elitec.it> wrote in message news:ul4IsLkKFHA.3500@TK2MSFTNGP14.phx.gbl... > Problem: > > If a datatable has 100 rows and use 1 MB of memory and then i use the > Clear() method and then > i refill the datatable with 10 rows. The memory usage of the DataTable is > still 1MB? > The Clear method frees memory usage of the datatable? > > If i want to free the memory usage of the Datatable, i must destroy the > DataTable and wait for the GC to collect that? > > By Simon. > > |
|
|
|
#3 |
|
Guest
Posts: n/a
|
> Are you actually running out of memory or just watching the memory usage?
I see that my app sometimes increase memory usage of about 10KB during usage of application and sometimes does not increase the memory usage. Since i have only a Form and an object containing the DataTable in memory why my app icrease memory uage? Simon. |
|
|
|
#4 |
|
Guest
Posts: n/a
|
Again, if you're not getting an error, don't worry about it. The GC will do
it's job when it feels it needs to, which doesn't always coincide with when you're watching. -- Chris Tacke Co-founder OpenNETCF.org Has OpenNETCF helped you? Consider donating to support us! http://www.opennetcf.org/donate "Simone" <simone.bonacin@elitec.it> wrote in message news:uxc2RhkKFHA.2812@TK2MSFTNGP15.phx.gbl... >> Are you actually running out of memory or just watching the memory usage? > > I see that my app sometimes increase memory usage of about 10KB during > usage > of application and sometimes does not increase the memory usage. > > Since i have only a Form and an object containing the DataTable in memory > why my app icrease memory uage? > > Simon. > > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

