Home › Forums › Legacy SDKs › eyeTracker.Dispose() sometimes hangs if called during calibration › Reply To: eyeTracker.Dispose() sometimes hangs if called during calibration
Part of the difficulty is that there is no synchronous method for ending calibration. If the user (or the OS) wants to close the application during calibration, I would have to try to cancel the quit event, call StopCalibrationAsync with a callback, and finally close the application in the callback. To me, trying to cancel quit events to clean up asynchronously seems like bad practice; a quit event should be interpreted as a demand to clean up synchronously. Thus, a resource such as the eye tracker should be disposable quickly and synchronously during application tear-down.
For me, the issue is arising with an EyeTracker that is created in the constructor of App (my Application subclass), accessed from a Page subclass that listens for eye tracking data events and calls eye tracking calibration methods, and disposed in App’s OnExit method.