feat: dispose cts.

This commit is contained in:
Dong Bin
2025-07-08 15:24:36 +08:00
parent 0323a873d5
commit 83e3756555

View File

@@ -93,6 +93,7 @@ public class Anchor : ItemsControl
} }
}; };
_cts.Cancel(); _cts.Cancel();
_cts.Dispose();
_cts = new CancellationTokenSource(); _cts = new CancellationTokenSource();
var token = _cts.Token; var token = _cts.Token;
token.Register(_ => _scrollingFromSelection = false, null); token.Register(_ => _scrollingFromSelection = false, null);