On mac system whenever i close android studio it leaves java process and java process keep running and keep hogging the ram memory.Having a mac with only 4gb is sometime painful if you see that java process is taking upto 1gb of ram
is there any option in android studio so that as soon as i quit all the process related to it should be closed or any command that i can run for cleanup?
From the documentation:
Daemon processes will automatically terminate themselves after 3 hours of inactivity. If you wish to stop a Daemon process before this, you can either kill the process via your operating system or run the gradle --stop command. The --stop switch causes Gradle to request that all running Daemon processes, of the same Gradle version used to run the command, terminate themselves.
No option in Android Studio AFAIK. One way to cleanup would be create a shell script that launches Android Studio and then kills off any leftover java processes afterwards e.g.
#!/bin/sh
studio.sh
pkill -f gradle-launcher
It happens because Android Studio uses gradle daemon by default (see here) and as far as I know it can't be turned off. Have a look here also - gradle daemon should time out after 3 hours.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With