-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove System.Reactive dependency #9
base: master
Are you sure you want to change the base?
Conversation
|
||
/// <inheritdoc /> | ||
protected override void OnDetaching() | ||
{ | ||
base.OnDetaching(); | ||
|
||
_disposables?.Dispose(); | ||
_disposable?.Dispose(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe set _disposable to null? Likely not necessary, but custom disposable instance might potentially leak something.
/// Represents an <see cref="System.IDisposable"/> that executes a specified action when disposed. | ||
/// </summary> | ||
/// <param name="dispose">The action to execute when disposed.</param> | ||
public class DisposableAction(System.Action dispose) : System.IDisposable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can be internal, unless you want to keep it public for custom third party behaviors/triggers.
@@ -64,5 +62,7 @@ protected override void OnAttachedToVisualTree(CompositeDisposable disposable) | |||
} | |||
}; | |||
animation.RunAsync(AssociatedObject); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a question, should animation be cancelled, when this behavior is detached?
Looks good to me, other than hypothetical _disposable leak. |
Fixes #8