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

Chardonnay Memory Leak #511

Closed
Mbucari opened this issue Feb 24, 2023 · 3 comments
Closed

Chardonnay Memory Leak #511

Mbucari opened this issue Feb 24, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@Mbucari
Copy link
Collaborator

Mbucari commented Feb 24, 2023

When the grid is reloaded in Chardonnay, (on library scan and when a book is "removed"), the DataGrid retains references to the old GridEntry objects so the GC cannot free them. This causes a pretty massive memory leak.

I'll need to do in chardonnay what classic already does: update existing GridEntry objects instead of instantiating new ones.

@Mbucari Mbucari added the bug Something isn't working label Feb 24, 2023
@rmcrackan
Copy link
Owner

Was this addressed in the latest PR? I usually don't give the Avalonia changes a lot of attention so I wouldn't have noticed.

@Mbucari
Copy link
Collaborator Author

Mbucari commented Mar 1, 2023

Sorry, no. It's actually kind of involved. I took a massive shortcut when I made the main grid. I tried doing what you did in classic, calling BindToGrid to load the library on init and then using UpdateGrid to process changes, but I ran into a series of problems that are non-trivial to fix without causing the grid to flicker too much.

@rmcrackan
Copy link
Owner

No worries -- take your time. I was just going through tickets to see what I might be able to close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants