Does it get released automatically if the process didn't released before it was killed?
Asked
Active
Viewed 1,068 times
3
-
1Yes it do release but not immediately. – AAnkit Sep 06 '12 at 09:27
-
you need to release it in `onDestroy()` – Aditya Nikhade Sep 06 '12 at 09:19
1 Answers
5
The wakelock is released if Process is killed. You can check this by below method
Acquire a wakelock and then run
adb shell dumpsys power
kill the process from ddms. Again run dumpsys power
You can see that the mlocks.size is back to 0.

nandeesh
- 24,740
- 6
- 69
- 79