Fix leaks of SeatRc and KbdRc, but using Weak in user data#1663
Fix leaks of SeatRc and KbdRc, but using Weak in user data#1663ids1024 wants to merge 2 commits intoSmithay:masterfrom
SeatRc and KbdRc, but using Weak in user data#1663Conversation
This fixes Smithay#1422. This can be tested by adding `Drop` impls that print to those two types, or using tools that detect leaks.
Update to calloop 0.14.3.
|
Updated now that calloop is released. LeakSanitizer in Anvil shows fewer leaks now. |
|
Any particular reason why this only addresses the |
|
Good point. Actually, that reference cycle may have been fixed a different way by #1516 (I may do a bit more testing). MemorySanitizer does show the calloop change addresses some leaks appearing there. |
|
Ah, I see. So #1516 changes May be best to still make this change, as well as a similar change for pointer and touch. Avoiding strong references like this in user datas seems good in general. |
This fixes #1422.
This can be tested by adding
Dropimpls that print to those two types, or using tools that detect leaks.It's probably worth examining more to see why this created a cycle or otherwise didn't get freed, but if we don't anticipate issues, maybe it's best to use
Weakin every possible place. I also need to look into some other reported leaks.