From dbf984152be04bef006d851c0e5989dadf63e37e Mon Sep 17 00:00:00 2001 From: Jason Walters Date: Sun, 31 Mar 2013 13:06:20 -0300 Subject: [PATCH] exit crash fix? MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I was experiencing an exit crash using the latest SDK.  The Leap thread was not closing properly. --- src/ofxLeapMotion/src/ofxLeapMotion.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ofxLeapMotion/src/ofxLeapMotion.h b/src/ofxLeapMotion/src/ofxLeapMotion.h index f3638ea..b6322dc 100644 --- a/src/ofxLeapMotion/src/ofxLeapMotion.h +++ b/src/ofxLeapMotion/src/ofxLeapMotion.h @@ -79,13 +79,17 @@ class ofxLeapMotion : public Listener{ ~ofxLeapMotion(){ //note we don't delete the controller as it causes a crash / mutex exception. - close(); + /// close(); /// JRW - we do not need this } void close(){ if( ourController ){ ourController->removeListener(*this); } + + /// JRW - let's delete our Leap controller + /// call close() on app exit + delete ourController; } //--------------------------------------------------------------