CommunityToolkit / CommunityToolkit/Labs-Windows

[TransitionHelper] CancellationTokenSource is disposable and needs handling for clean-up

Open
#407 1 comment 0 reactions 0 assignees View on GitHub
experiment :test_tube: issue 🧪
Dominant language
C#
Stars
482
Forks
89
PR merge metrics
No merged PRs in 30d

Description

Issue with an inner disposable reference that needs to be cleaned up by the parent class to avoid the C# compiler warning:

```
D:\a\Labs-Windows\Labs-Windows\components\TransitionHelper\src\TransitionHelper.Animation.cs(30,29): error CA1001: Type 'TransitionHelper' owns disposable field(s) '_currentAnimationCancellationTokenSource' but is not disposable [D:\a\Labs-Windows\Labs-Windows\components\TransitionHelper\src\CommunityToolkit.Labs.WinUI.TransitionHelper.csproj]
```

For now this is ignored. Not sure how we want to handle this as it is a resourced helper...

_Originally posted by @michael-hawker in https://github.com/CommunityToolkit/Labs-Windows/issues/354#issuecomment-1444748087_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.