When I run android studio I noticed that it creates multiple java.exe processes, sometime when I don't pay attention the number goes up to 50+ until no more ram left.
this happened with three different projects.
task manager showing 30+ java.exe process
I'm using latest version of android studio: