Posted 20 years ago by Marianne
Avatar
After opening a 9 MB file, the memory consumption shot up to around 400MB, but then after closing the file (and keeping the app open) the memory usage was never freed. There is no explicit destructor for the SyntaxEditor itself, so is calling DocumentWindow.Hide() keep the Editor alive in memory? And if so, how can we fully remove it once the tab is closed? Thanks.

------------------------------- Marianne

Comments (12)

Posted 20 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
If you handle DocumentWindowClosed, then you can remove the child control (which I assume is a SyntaxEditor) and then explicitly Dispose it. We used to do that automatically however some users didn't want us to.


Actipro Software Support

Posted 20 years ago by Marianne
Avatar
How can the child (yes, it's a syntaxeditor) be removed before calling Dispose()? The child property is read-only and there doesn't seem to be a remove method for doing so.

Calling Dispose() without removing the editor from the DWDocumentWindow doesn't reduce the memory demand.

[ 06-25-2004: Message edited by: Marianne ]

------------------------------- Marianne

Posted 20 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Probably in DocumentWindowClosed, do an:
editor.Parent.Controls.Remove(editor);
editor.Dispose();


Actipro Software Support

Posted 20 years ago by Marianne
Avatar
After doing that, the memory usage doesn't decrease. Would like to be able to completely remove the files from memory when done with them.

------------------------------- Marianne

Posted 20 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Shouldn't the garbage collector be picking them up?


Actipro Software Support

Posted 20 years ago by Marianne
Avatar
Even if forcing the garbage collector to run, the memory isn't reclaimed.

------------------------------- Marianne

Posted 20 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Are you able to tell what type of objects in memory are remaining?


Actipro Software Support

Posted 20 years ago by Marianne
Avatar
No, not directly. What would be the simplest way to check this?

------------------------------- Marianne

Posted 20 years ago by Marianne
Avatar
Just to clarify, are you asking what SyntaxEditor objects are remaining or are you asking if my application is holding additional unrelated objects?

There are no Editor objects remaining, but the memory utilization is the same as though the Editor objects haven't been removed. Any objects internal to my app specifically are all accounted for.

------------------------------- Marianne

Posted 20 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
We need someone with a profiler application to dig into this to see what classes are being retained in memory. I'm working with someone to try and track this down.

Also I'll be going through the drawing code to ensure that all brushes are being disposed.


Actipro Software Support

Posted 20 years ago by Marianne
Avatar
Do you have any status update on this? Thanks.

------------------------------- Marianne

Posted 20 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Yes the latest version has a number of GDI cleanup routines added that should help.


Actipro Software Support

The latest build of this product (v24.1.0) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.