private void OnDestroy()
 {
     if (commandBuffer != null)
     {
         targetCamera.RemoveCommandBuffer(CameraEvent.BeforeForwardOpaque, commandBuffer);
         commandBuffer.Dispose();
     }
     arMat.Dispose();
     Destroy(targetTexture);
 }
        private void OnDestroy()
        {
            if (commandBuffer != null)
            {
                targetCamera.RemoveCommandBuffer(CameraEvent.BeforeForwardOpaque, commandBuffer);
                commandBuffer.Dispose();
            }
            arMat.Dispose();
            Destroy(targetTexture);

            stopSignal = true;
            barcodeDecoderThread.Join();
        }