Miha
Tue Jun 28 13:01:58 CDT 2005
Hi Fith,
As I've mentioned before, Task Manager is not the right place to look at
memory usage for .net applications.
The .net memory management is a bit complex and you'll have to read some
articles to understand it.
The golden rule is to Dispose every class that implements IDisposable.
--
Miha Markic [MVP C#] - RightHand .NET consulting & development
www.rthand.com
Blog:
http://cs.rthand.com/blogs/blog_with_righthand/
SLODUG - Slovene Developer Users Group www.codezone-si.info
"Fith" <Fith@discussions.microsoft.com> wrote in message
news:87237F93-7FEB-43D9-866A-00A332949549@microsoft.com...
> Miha -
>
> I don't want to use the profiler yet, as it looks like it would take a
> weeks
> worth of study just to figure out how to use and interpret it... I don't
> have that kind of time.
>
> Anyway, I found that minimizing my app seems to bring the memory reading
> in
> taskmanager way down as well - so it isn't the dataset. I'd like to find
> out
> why this behavior takes place as well now...
>
> -Peter
>
> "Miha Markic [MVP C#]" wrote:
>
>> Hi,
>>
>> I really doubt that DataSet is the culprit.
>> Why don't you profile your app using one of the mentioned profiles
>> instead
>> to find the reason?
>>
>> --
>> Miha Markic [MVP C#] - RightHand .NET consulting & development
>> www.rthand.com
>> Blog:
http://cs.rthand.com/blogs/blog_with_righthand/
>> SLODUG - Slovene Developer Users Group www.codezone-si.info
>>
>> "Fith" <Fith@discussions.microsoft.com> wrote in message
>> news:56AFB82F-5490-4F08-B9B0-13E2BC226098@microsoft.com...
>> > I've heard other people say that the 'Mem Usage' is not an accurate
>> > view
>> > of
>> > the memory usage, but I don't buy that - my application runs
>> > increasingly
>> > more slowly every time the DataSet is filled (the task manager's 'Mem
>> > Usage'
>> > increases) until the application is virtually unusable. Also, other
>> > tasks
>> > on
>> > the computer are affected (run slow) at this point. Once I close my
>> > application, all response returns to normal. The memory is definitely
>> > being
>> > allocated and not returned, no matter what people say about task
>> > manager
>> > not
>> > being an accurate measure of memory usage...
>> >
>> > I need to know if someone has any knowledge of this issue with DataSet
>> > memory not being released.
>> >
>> > Thanks all,
>> >
>> > -Peter
>> >
>> > "Miha Markic [MVP C#]" wrote:
>> >
>> >> Hi Fith,
>> >>
>> >> I don't think that Task Manager is a proper tool for monitoring memory
>> >> usage.
>> >> Instead, try one of the memory profilers - there are free ones:
>> >>
>> >> Allocation Profiler
>> >>
http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=36A3E666-6877-4C26-B62D-BFD7CB3154AC
>> >> Devpartner Community edition
>> >>
http://www.compuware.com/products/devpartner/profiler/default.asp?cid=3019X36&focus=DevPartner&source=Web+%2D+Evaluation+Request&desc=Download+%2D+%27DevPartner+Profiler+Community+Edition%27&offering=DevPartner&sf=1&p=0
>> >>
>> >> and commercial ones:
>> >> AQTime
>> >>
http://www.automatedqa.com/products/aqtime/index.asp
>> >> ..NET Memory Profiler
>> >>
http://www.scitech.se/memprofiler/
>> >>
>> >> And others...
>> >>
>> >> --
>> >> Miha Markic [MVP C#] - RightHand .NET consulting & development
>> >> www.rthand.com
>> >> Blog:
http://cs.rthand.com/blogs/blog_with_righthand/
>> >> SLODUG - Slovene Developer Users Group www.codezone-si.info
>> >>
>> >> "Fith" <Fith@discussions.microsoft.com> wrote in message
>> >> news:EFA1B9FC-4FA4-4C40-911D-8773A7ECBD75@microsoft.com...
>> >> > Hello -
>> >> >
>> >> > I've developed an application which uses DataSets which are local to
>> >> > specific methods - so they should go out of scope when the form they
>> >> > are
>> >> > on
>> >> > is closed. I am finding that while monitoring the memory usage
>> >> > through
>> >> > task
>> >> > manager, the memory will increase while the dataset is filled, but
>> >> > memory
>> >> > is
>> >> > never released when the form is closed. Even when using the
>> >> > Dispose()
>> >> > method
>> >> > of the DataSet, as well as explicitly calling GC.Collect() and
>> >> > GC.WaitForPendingFinalizers(). After searching the web for hourse,
>> >> > I
>> >> > cannot
>> >> > find anyone who can solve this problem. Does anyone know how to fix
>> >> > this?
>> >> >
>> >> > Thanks,
>> >> >
>> >> > -Peter
>> >>
>> >>
>> >>
>>
>>
>>