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

DispatcherTimer should inherit IDisposable #1399

Closed
lindexi opened this issue Feb 25, 2018 · 1 comment
Closed

DispatcherTimer should inherit IDisposable #1399

lindexi opened this issue Feb 25, 2018 · 1 comment

Comments

@lindexi
Copy link
Contributor

lindexi commented Feb 25, 2018

public class DispatcherTimer

As this code that DispatcherTimer is the property _timer and it can be disposed in the destructor .

But it cant be disposed in DispatcherTimer that we should call the Stop to dispose it.

And I find another bug in DispatcherTimer like wpf. If the dever use DispatcherTimer and give the zero interval and dont write the Tick it will use 100% cpu in a thread.

I think it needs to check if the Tick is null and when the Tick is null, it will not really run.

@kekekeks
Copy link
Member

kekekeks commented Jul 3, 2023

Dispatcher timers are now tracked by dispatcher rather than the platform code

@kekekeks kekekeks closed this as completed Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants