onDetachedFromEngine calls closeCurrentConnection() without stopping the shared native session first (uvc_close_device). If the engine detaches while a preview is active, libuvc's transfer threads can keep using the closed (and possibly reused) file descriptor.
Same pattern as the Linux plugin dispose issue found in PR #6 and fixed there in 57994dd; the fix is the same shape: tear down the native session before releasing the connection.
Low urgency: the path only triggers on engine teardown with an active preview (e.g. add-to-app engine destruction); normal app exits kill the process outright.
onDetachedFromEnginecallscloseCurrentConnection()without stopping the shared native session first (uvc_close_device). If the engine detaches while a preview is active, libuvc's transfer threads can keep using the closed (and possibly reused) file descriptor.Same pattern as the Linux plugin dispose issue found in PR #6 and fixed there in 57994dd; the fix is the same shape: tear down the native session before releasing the connection.
Low urgency: the path only triggers on engine teardown with an active preview (e.g. add-to-app engine destruction); normal app exits kill the process outright.