I have an C# application that is using few threads (specially for showing graphic chart and get data from a device).
After some uses my app becomes slower and I must restart computer to solve this problem.
How can I solve this problem?
I have an C# application that is using few threads (specially for showing graphic chart and get data from a device).
After some uses my app becomes slower and I must restart computer to solve this problem.
How can I solve this problem?
Can you ensure that your application in not running in the background when you close it. You may check it in TaskManager. If it is not there, the process was terminated and all threads that belong to app are terminated too.
There may be some unmanaged resources that your app didn't release.
There is two types of Thread. They are Background and Foreground. If your threads are Foreground the application will not close until all foreground threads are finished.
https://learn.microsoft.com/en-us/dotnet/standard/threading/foreground-and-background-threads
And you should dispose
all your unmanaged resources as @opewix says.