public void finalize() { active = false; INSTANCE = null; SensorBus.getInstance().unsubscribe(this); if(featureRunner!= null && featureRunner.isAlive()) { featureRunner.stop(); } featureRunner= null; Log.d(TAG, "Destroyed FeatureCalculation"); }
private FeatureCalculation() { active = true; SensorBus.getInstance().subscribe(this); }