Objects not being destroyed #420

Open
opened 2024-01-11 06:41:11 -06:00 by BernardinoGoncalvesLynx · 3 comments
BernardinoGoncalvesLynx commented 2024-01-11 06:41:11 -06:00 (Migrated from github.com)

Hello friends, I hope you are well, I have the following difficulty, I have a WPF application using .net framework 4.7.2 where I have a main window that when clicking on a button opens a second window that contains the editor, but a memory leak was noticed and during the investigation with dotMemory we noticed that the AvalonEdit objects were not being destroyed, and each time the window was opened new objects were created. To validate, I created a new project where the window only had the AvalonEdit component and no other events or objects linked to it, and even so the object was not being destroyed when closing the window.
Some points that may help, In the last test there was no data input to AvalonEdit, no text or files were loaded into the component, nor were they added to the component input.

Hello friends, I hope you are well, I have the following difficulty, I have a WPF application using .net framework 4.7.2 where I have a main window that when clicking on a button opens a second window that contains the editor, but a memory leak was noticed and during the investigation with dotMemory we noticed that the AvalonEdit objects were not being destroyed, and each time the window was opened new objects were created. To validate, I created a new project where the window only had the AvalonEdit component and no other events or objects linked to it, and even so the object was not being destroyed when closing the window. Some points that may help, In the last test there was no data input to AvalonEdit, no text or files were loaded into the component, nor were they added to the component input.
siegfriedpammer commented 2024-01-11 17:09:24 -06:00 (Migrated from github.com)

Would you be able to provide full example app that shows the memory leak?

I created the following application, which creates new windows on button click (and I can see the memory usage go up in the diagnostic tools/debugger), but the memory usage drops as soon as I start closing the windows again.

WpfApp4.zip

Thanks!

Would you be able to provide full example app that shows the memory leak? I created the following application, which creates new windows on button click (and I can see the memory usage go up in the diagnostic tools/debugger), but the memory usage drops as soon as I start closing the windows again. [WpfApp4.zip](https://github.com/icsharpcode/AvalonEdit/files/13909359/WpfApp4.zip) Thanks!
PedroFolladorLynx commented 2026-02-13 11:58:48 -06:00 (Migrated from github.com)

I'm revisiting this issue and I'd like to make a few points regarding the OS used in the tests. I'm running Windows 11 Pro 23H2 here, and the RAM usage grows up even with the WpfApp4 example. Even after I close the application, the memory remains allocated and doesn't start to drop like you mentioned. Another important piece of information is the AvalonEdit version used in my project: 6.3.1.120.

I'm revisiting this issue and I'd like to make a few points regarding the OS used in the tests. I'm running Windows 11 Pro 23H2 here, and the RAM usage grows up even with the WpfApp4 example. Even after I close the application, the memory remains allocated and doesn't start to drop like you mentioned. Another important piece of information is the AvalonEdit version used in my project: 6.3.1.120.
Sixhourz commented 2026-04-13 11:49:31 -05:00 (Migrated from github.com)

Also seeing the same issue. Running 6.3.1.120, on .NET 9.

Also seeing the same issue. Running 6.3.1.120, on .NET 9.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-icsharpcode/AvalonEdit#420
No description provided.