The ideal amount of RAM that phones need for their smooth multitasking is quite a debated topic. Apple gets by with a smaller size in its iPhones, which is often more usable than Android solutions. You will also not find any kind of RAM memory management on the iPhone, whereas Android has its own dedicated function for this.
If you go, for example, in Samsung Galaxy phones to Settings -> Device care, you will find a RAM indicator here with information on how much space is free and how much is occupied. After clicking on the menu, you can see how much memory each application is taking, and you also have the option to clear the memory here. The RAM Plus function is also located here. Its meaning is that it will bite off a certain number of GB from the internal storage, which it will use for virtual memory. Can you imagine something like this on iOS?
Smartphones rely on RAM. It serves them to store the operating system, to launch applications and also to store some of their data in the cache and buffer memory. Thus, RAM must be organized and managed in such a way that applications can run smoothly, even if you drop them to the background and open them again after a while.
Swift vs. Java
But when starting a new application, you need to have free space in memory to load and run it. If this is not the case, the place must be vacated. The system will therefore forcefully terminate some running processes, such as applications that have already started. However, both systems, i.e. Android and iOS, work differently with RAM.
The iOS operating system is written in Swift, and iPhones don't actually need to recycle used memory from closed apps back into the system. This is due to the way iOS is built, because Apple has full control over it since it only runs on its iPhones. In contrast, Android is written in Java and is used on many devices, so it must be more universal. When the application is terminated, the space it took is returned to the operating system.
Native code vs. JVM
When a developer writes an iOS app, they compile it directly into code that can run on the iPhone's processor. This code is called native code because it requires no interpretation or virtual environment to run. Android, on the other hand, is different. When Java code is compiled, it is converted to Java Bytecode intermediate code, which is processor-independent. It can therefore run on different processors from different manufacturers. This has huge advantages for cross-platform compatibility.
Of course, there is also a downside. Each operating system and processor combination needs an environment known as the Java Virtual Machine (JVM). But native code performs better than code executed through the JVM, so using the JVM simply increases the amount of RAM used by the application. So iOS apps use less memory, on average 40%. That's also why Apple doesn't have to equip its iPhones with as much RAM as it does with Android devices.
I'm not exactly an expert, but I'll describe my perspective from the perspective of a user who has used android for 15 years and is now 2 months into the iPhone 13 mini. On android with 8GB memory (most recently Samsung S21, Flip3) I usually returned after a certain time to the previously launched application and it was still loaded in RAM, so it didn't start all over again and I could smoothly pick up where I left off. On the other hand, even with 8GB of memory, I "shot down" all applications once a week to clear the RAM, because the system started to slow down with full memory. I don't have a problem with slowing down on the iPhone, but on the other hand, I have to say that when using almost identical applications, on the contrary, it regularly happens to me that when I return to a previously launched application, it loads completely again and I can't smoothly continue where I left off .
Which option is better? Hard to say… Killing apps on android and clearing RAM is a matter of two clicks. Loading the entire application again on the iPhone is not so time-consuming, so it doesn't matter so much... Of course, it would be ideal to have more RAM on the iPhone and multitasking like on Android :-D
Shit, it's stupid again. For one thing, Android hasn't been done in Java for a long time, that's what Kotlin is for. Garbage collector is in charge of the memory, which is the simplest in iOS, which exists even with its disadvantages. The whole thing is that iOS kills apps as soon as you take them off the screen. This frees memory just like on linux when you type kill pid of a process. That's why it takes so long to open the browser and return to the previous work. This article is a verbatim translation of an X year old article by an iOS fanatic with no programming knowledge. Yes, of course, memory management is mainly the responsibility of the programmer, what the application does. If he coughs on it, there is a memory leak in the world and pqk you can have X Gb of memory and it's still useless. And at a time when many applications are only WebView, this is very simple, because it itself eats what it can. The article is nonsense, garbage.
Android no longer uses jvm, but dvm. And in addition, it then compiles it into a native executable
Java is still in Android.