Need detach() before stopping hi-res timer in Android?


#1

Hi,

I have defined a HighResolutionTimer-derived class and in the hiResTimerCallback method I stop the timer (under certain conditions).

Apparently I need to add a threadLocalJNIEnvHolder.detach(); call before I call stopTimer(), as otherwise the app will crash under Android.

Is that correct ? Am I doing something wrong ? If not shouldn't that be in the stopTimer method for Android ?

Thanks. 


#2

Yes, you're right - thanks for the heads-up! That should be sorted now if you want to try again..


#3

Yep ! It works now.

Thanks.