Application leaking Strings?

Posted by Jörg B. on Stack Overflow See other posts from Stack Overflow or by Jörg B.
Published on 2010-05-11T10:06:02Z Indexed on 2010/05/11 10:14 UTC
Read the original article Hit count: 301

My .net application does some heavy string loading/manipulation and unfortunately the memory consumption keeps rising and rising and when looking at it with a profiler I see alot of unreleased string instances. Now at one point of time or another I do need all objects t hat do have these string fields, but once done, I could get rid of e.g. the half of it and I Dispose() and set the instances to null, but the Garbage Collector does not to pick that up.. they remain in memory (even after half an hour after disposing etc).

Now how do I get properly rid of unneeded strings/object instances in order to release them?

They are nowhere referenced anymore (afaik) but e.g. aspose's memory profiler says their distance to the gc's root is '3'?

© Stack Overflow or respective owner

Related posts about .NET

Related posts about memoryleak