Re: Memory leak when using Response.Write()

Tech-Archive recommends: Fix windows errors by optimizing your registry



When you remove the reference to the dataset, it won't be collected immediately. It will be collected when the garbage collector is run, and that only happens when the memory is needed, or when the garbage collector thinks that it's convenient to do a collection.

It's normal for the memory usage to increase while an application runs. If your application uses and releases a lot of objects, you would observe a sawtooth like curve where the memory usage increases to a certain point until a garbage collection occurs and frees up a ot of memory at once.

Piotrek wrote:
Thanks for your answers.

So if it is not a problem with frames, then I have no idea, what it can
be.

What more I noticed is that there are datasets (datacolumns,
dataviews), which are not collected by GC. I store results of search in
Session as datasets, but after a while I set them to null, so they
should be collected.

One more thing I do not understand is why usage of memory increases
after executing the code I posted earlier and before PageLoad method is
called.

I know that it is hard for you to answer that questions, but maybe you
know something, which could help me?

Piotrek.

.



Relevant Pages

  • Re: to dispose or not ?
    ... always have the system memory roots available. ... collector for the Gen0 and Gen1 heaps and a mark/sweep/compact collector for ... heap or compacts free space out of the heap. ... the reference from the variable to the object in the heap. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: to dispose or not ?
    ... always have the system memory roots available. ... It also means that MS took some shortcuts in the garbage collector to improve the performance of finalizers. ... the reference from the variable to the object in the heap. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Memory Allocation?
    ... we shouldn't need access to the Garbage Collector ... I answered earlier that the *way* CPython allocates and uses memory it ... from writing a memory profiler;) ...
    (comp.lang.python)
  • Re: Garbage Collection
    ... Letting the GC be able to recycle the memory of parts of a collection/datastructure before the whole collection/datastructure itself leaves the scope. ... Say some programmer with a limited data set and a non-deterministic garbage collector has to iterate through this 10 times during testing. ... But when you put that same situation in the real world where you might have to iterate through 50,000 items, periodically the user is going to curse the computer when he can't move the mouse because some background garbage collection process steals his cpu while managing all this memory that has been abandoned. ...
    (borland.public.delphi.non-technical)
  • Re: clustering of objects in a VM
    ... I.e., if during say, an ephemeral collection cycle, two objects were ... accessed within the same ephemeral cycle the collector knows what memory was ... > references in the system to objectB and objectC. ...
    (comp.lang.smalltalk)