I am a WPF / C # application that has a psuedo process Click the button> Start Stream to take a snapshot from the webcam API> Instant Webcam API> The API starts the callback thread> Shooting in progress> The API object is located
These steps usually work, except in the last part, where the webcam API callback thread does not close. Thus, in my task manager, I always get a ghost process that has the same name as my underlying WPF application. In addition, a second call to the same webcam API (to take a second snapshot) fails.
So, I am trying to find a way to make sure that all my threads from my root application are forcibly closed at any time. Is there any way to make sure that no threads are left?
source share