mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 17:56:44 +02:00
_We already fixed one leak, yes, but what about second leak?_ We already clean up `ListItemViewModel`s for a page when the page is navigated away from. However, if the page updates it's items, we would never actually `Cleanup` the old items. We'd just lose them, and never unregister their event handlers. The objects would just leak forever. This builds on the work in #41166, to do two things: * Cleanup items that were removed from our list, when we actually update `Items`. This involved a change to `Toolkit.ListHelpers`, to let us know which items were removed from the list during `InPlaceUpdateList` * Cleanup items that are thrown out when we cancel a FetchItems. Those items were constructed, and might have registered event handlers, even if we never actually put them into `Items`. _Targets #41166_ Closes #39837 Tested with the evil sample from #41158, and loading thousands and thousands of items no longer causes us to leak memory like we're Deepwater Horizon.
Command Palette Extension Toolkit
The C# toolkit for building your own extension for the Command Palette.
The quickest way to get started building an extension is to install the Command Palette, and use the "Create a new extension" command. That will set up a project for you, with the packaging, dependencies, and basic program structure ready to go.
To view the full docs, you can head over to our docs site
There are samples of just about everything you can do in the samples project. Head over there to see basic usage of the APIs.