Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wieslawsoltes
Copy link
Owner

Fixes #8


/// <inheritdoc />
protected override void OnDetaching()
{
base.OnDetaching();

_disposables?.Dispose();
_disposable?.Dispose();
Copy link
Contributor

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
Copy link
Contributor

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);
Copy link
Contributor

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?

@maxkatz6
Copy link
Contributor

maxkatz6 commented Nov 4, 2024

Looks good to me, other than hypothetical _disposable leak.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[12.0] Avoid Reactive types in the public API
2 participants