Open
Description
There is a severe memory leak in some UpDownBaseTests.
As shown in this trace, there are subscriptions to UserPreferenceChanged that are never unsubscribed.
One example is UpDownBase_OnHandleCreated_Invoke_CallsHandleCreated
which manually calls OnHandleCreated
(which subscribes to the event), but never calls OnHandleDestroyed
.
Alternatively, might be worth try calling CreateHandle
instead of OnHandleCreated
, so that Dispose
can see that a handle is created and then it can destroy properly.