I agree with Josh. System.String is not going to cause any memory leaks. If
you abuse it, it can run your memory up quite a bit, but it will come back
down. On the other hand, ResourceReader is a disposable class that works
with files. Not closing and/or disposing such a class can cause a memory
leak.
Now, I know that you've stated that you close and dispose the
ResourceReader, but are you sure that you always do so? For example, is the
close and dispose in a Finally block of a Try/Catch block? If not, an
exception might prevent the ResourceReader from being disposed properly.
You might want to look for any other classes that expose unmanaged objects,
particularly classes that work with File IO.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
"Frank1213" <Fr*******@discussions.microsoft.com> wrote in message
news:DC**********************************@microsof t.com...
We in fact Close,Dispose and even set the reader to null.
"Josh" wrote:
Its not likely to be the fault of the string. I bet its the Reader not
cleaning up. Try killing the reader.
"Frank1213" <Fr*******@discussions.microsoft.com> wrote in message
news:ED**********************************@microsof t.com... > In my ASP.NET application, we are noticing appreciable memory leaks and
> the
> main culprit appears to be System.String We use ResourceReader to
> read
> in a
> resource file and we close and dispose the resourcereader object also.
> We
> profiled the application using .NET Memory profiler and it appears that
> garbage collection does not appear to be happening. Even after closing
> all
> sessions memory for aspnet process remains pegged at the level it was.
> Has anyone run across a similar situation? Any ideas would be greatly
> appreciated.