PC Review


Reply
Thread Tools Rate Thread

Memory usage of DataTable

 
 
Simone
Guest
Posts: n/a
 
      16th Mar 2005
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.


 
Reply With Quote
 
 
 
 
Chris Tacke, eMVP
Guest
Posts: n/a
 
      16th Mar 2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.
>
>



 
Reply With Quote
 
Simone
Guest
Posts: n/a
 
      16th Mar 2005
> 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.


 
Reply With Quote
 
Chris Tacke, eMVP
Guest
Posts: n/a
 
      16th Mar 2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>> 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.
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Performance and Memory Usage Consideration about DataTable and Dat =?Utf-8?B?U2FtdWVs?= Microsoft ADO .NET 15 11th Mar 2011 11:22 PM
My available memory is down to very little, yet my PF Usage is 8 gigabytes (about how much memory is on the box), sql server keeps having memory issues yet the sqlservr.exe is using hardly any memory.. how to fix this? is there some way to limit how Daniel Microsoft Windows 2000 Security 1 30th Aug 2007 08:38 AM
My available memory is down to very little, yet my PF Usage is 8 gigabytes (about how much memory is on the box), sql server keeps having memory issues yet the sqlservr.exe is using hardly any memory.. how to fix this? is there some way to limit how Daniel Microsoft Windows 2000 1 30th Aug 2007 02:22 AM
My available memory is down to very little, yet my PF Usage is 8 gigabytes (about how much memory is on the box), sql server keeps having memory issues yet the sqlservr.exe is using hardly any memory.. how to fix this? is there some way to limit how Daniel Microsoft Windows 2000 Networking 0 28th Aug 2007 01:38 AM
My available memory is down to very little, yet my PF Usage is 8 gigabytes (about how much memory is on the box), sql server keeps having memory issues yet the sqlservr.exe is using hardly any memory.. how to fix this? is there some way to limit how Daniel Microsoft Windows 2000 Advanced Server 0 28th Aug 2007 01:38 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:16 PM.