Another large file question

SyntaxEditor for Windows Forms Forum

Posted 17 years ago by Kasper
Version: 4.0.0249

When loading a large file into SyntaxEditor, the memory consumption of my application goes from ~80 mb to ~700 mb, despite the fact that the loaded file is only on 12 mb. I understand just fine that SyntaxEditor is not geared towards editing very large files, and this is not likely to be a problem for most of my customers. However, one thing does worry me: Once I close the document, the memory is not free'd. I tried to add a Dispose() call on the Document object, but that didn't seem to make a difference. I then tried to do a GC.Collect(); afterwards, and that worked. But is that the best way to do it?

Comments (2)

Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
If you are just using something like the task manager to track memory then that is not an accurate way to do it. We like SciTech's .NET Memory Profiler because it will show you what has been disposed and released, etc.

Most likely in your scenario, the memory is freed by us but just hasn't been collected yet by the garbage collector. This especially sounds correct since your call to GC.Collect removed the memory. If we were still referencing the memory then that wouldn't have made a difference. The GC only runs as it deems necessary.

Actipro Software Support

Posted 17 years ago by Thomas Goff
Another trick is to minimize and then restore your application. This article explains the reasons.
The latest build of this product (v24.1.0) was released 4 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.