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

LayoutDocument leaks on close #171

Closed
ladych opened this issue Jul 2, 2020 · 7 comments
Closed

LayoutDocument leaks on close #171

ladych opened this issue Jul 2, 2020 · 7 comments

Comments

@ladych
Copy link

ladych commented Jul 2, 2020

It seems that LayoutDocument needs to be freed somwhere after the Document Pane is closed. Here is small Reproducer. It seems that Document is hold by private property of Docingmanager it self. Is there any correct way to Free Document After it is closed?
AvalonDocPanelMemoryLeaks.zip

LyonJack added a commit to LyonJack/AvalonDock that referenced this issue Jul 3, 2020
LyonJack added a commit to LyonJack/AvalonDock that referenced this issue Jul 3, 2020
@LyonJack
Copy link
Contributor

LyonJack commented Jul 3, 2020

image

LyonJack added a commit to LyonJack/AvalonDock that referenced this issue Jul 3, 2020
@LyonJack
Copy link
Contributor

LyonJack commented Jul 3, 2020

I have clear all of the references of this usercontrol on the demo created,but when I check the memory,there is a stack not recycling,Make sure this Load of HeavyLoad will be collected by GC.Help me double check my pull request LyonJack@6ec1e30 will work well
@ladych @Dirkster99

@LyonJack
Copy link
Contributor

LyonJack commented Jul 3, 2020

When I change the demo code to
image
Then when Click the button,this memory is still growing

@ladych
Copy link
Author

ladych commented Jul 3, 2020

As I mentioned: The only link which holds LayoutItem object is _layoutItems of DockingManager if you removes it from DockingManager everything is fine.
Hereis an object graph after you create Document and close it:
grafik

@LyonJack
Copy link
Contributor

LyonJack commented Jul 3, 2020

1593765119(1)
I means I have do some jobs to clear the references,and I have pull request, wait a new version,or take my fork to test it

@LyonJack
Copy link
Contributor

LyonJack commented Jul 3, 2020

8

@Dirkster99
Copy link
Owner

@ladych
I was able to verify the result that LyonJack shows here. The AvalonDocPanelMemoryLeaks project is now merged in the current branch. Please feel free to give feedback if you still do not see this resolved.

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

3 participants