How to find out how much memory my Android app is using?
Hello everyone! I'm a beginner Android developer in Java, and I'm having a performance issue with my app. I noticed that after several screen transitions, the app starts to lag, and sometimes even crashes with an OutOfMemoryError. \n\nI suspect it's related to memory leaks, but I don't know how to measure how much memory my app is actually consuming. I tried looking at the Android Studio Profiler, but there's too much data, and I don't understand what to pay attention to.\n\nHere's an example of code that I think might be problematic. I'm loading images from the internet and saving them in a static list for caching:\n\n```java\npublic class ImageCache {\n private static List cache = new ArrayList<>();\n \n public static void addImage(Bitmap bitmap) {