This is currently difficult because closing a port is an asynchronous operation, and therefore can't be triggered by the time the object is being deallocated. One possible fix is to create a helper object that is responsible for actually closing the port, whose lifetime is independent of the ORSSerialPort instance, and that can keep itself alive until the port is actually closed.
This is currently difficult because closing a port is an asynchronous operation, and therefore can't be triggered by the time the object is being deallocated. One possible fix is to create a helper object that is responsible for actually closing the port, whose lifetime is independent of the
ORSSerialPort
instance, and that can keep itself alive until the port is actually closed.