Skip to content

Commit

Permalink
Close LedControl on destroy
Browse files Browse the repository at this point in the history
  • Loading branch information
Nilhcem committed May 2, 2017
1 parent 5c2818c commit 3bd7fea
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -60,10 +60,14 @@ public void onDestroy() {
if (mServo != null) {
mServo.close();
}
if (mLedControl != null) {
mLedControl.close();
}
} catch (IOException e) {
Log.e(TAG, "Error closing lucky cat resources", e);
} finally {
mServo = null;
mLedControl = null;
}
}
}

0 comments on commit 3bd7fea

Please sign in to comment.