zxing-js/library

Memory leak in winforms C#

ahmedtalaat327 opened this issue ยท 0 comments

Describe the bug
I cant end the thread even if uses :
SignalToStop() func.

this is a piece of code ๐Ÿ‘

`

private void Exitcamera()
{
videoCaptureDevice.SignalToStop();
// FinalVideo.WaitForStop(); << marking out that one solved it
//videoCaptureDevice.Stop();
videoCaptureDevice.NewFrame -= new NewFrameEventHandler(VideoCaptureDevice_NewFrame); // as sugested
videoCaptureDevice = null;
}

`

Expected behavior
the thread must end but when I try to exit the window application the app still in processes

Desktop (please complete the following information):

  • OS: Windows 11
  • Visual studio x64

screens:
Screenshot 2024-10-13 001447
Screenshot 2024-10-13 001421