Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memeory Issue: Two many objects cannot be collected by GC #405

Closed
sinotaotao opened this issue Jul 23, 2023 · 2 comments
Closed

Memeory Issue: Two many objects cannot be collected by GC #405

sinotaotao opened this issue Jul 23, 2023 · 2 comments

Comments

@sinotaotao
Copy link

In my program, after set Text attribute of a AvalonTextEditor with a string that has 1,000,000 lines, set Text to EMPTY again, I found a Memory problem. It seems too many objects are not GC.Collect.

Even set TextEditor variable to null is no help. The huge memory must be freeed after the process exits.

It seems we cannot clear Document.Lines, which is a list of DocumentLine type.

So, the problem is how to free memory after a big document closed?

image

@sinotaotao
Copy link
Author

I think the problem is same with #386

asign a new documet to Editor object is no help, too.

textEditor.Document = new Avalon.Document.TextDocument(value);

@sinotaotao
Copy link
Author

UPDATE: Objects mentioned in the first post could be collected by GC, and its count is correct on my another computer.
The computer which has memory problem was send to maintaince.
After some tests, I found the TASKMGR lists the app with a big memory value. the objects with most memeoy used value is TlsOverPerCoreLockedStacksArrayPool. Maybe process take some memory for pool to improve performance, so this is not a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant