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

Support IAsyncDisposable in razor components #19197

Closed
msschl opened this issue Feb 20, 2020 · 2 comments
Closed

Support IAsyncDisposable in razor components #19197

msschl opened this issue Feb 20, 2020 · 2 comments

Comments

@msschl
Copy link
Contributor

msschl commented Feb 20, 2020

In order to dispose a razor component in blazor, I need to do some js side cleanups e.g. remove stored DotNetObjectReference from an array and remove some js event listeners.
The js runtime only supports async invoke methods.

One easy solution would be to support IAsyncDisposable in razor components and do the cleanup and disposal of the DotNetObjectReference as part of the async disposal.

@campersau
Copy link
Contributor

Looks like a duplicate of #9960

@msschl
Copy link
Contributor Author

msschl commented Feb 20, 2020

Thanks @campersau. Closing...

@msschl msschl closed this as completed Feb 20, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Mar 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants