The lumia 630 having 512 mb of ram performs tasks faster and smoother than moto g which has same specs but ram being 1 gb!
closed as primarily opinion-based by Nirav Madariya, Kolappan N, Manuel Durando, Michaël Polla, Thomas♦ Apr 22 '16 at 18:54
Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.
Because, JAVA programming language, where developers make app for android (Android studio), don't have method to empty garbage when user close it. Phone will empty garbage when that application notice that is no longer used it by user.
Other programming languages have that options, so when you close app garbage will be empty.
PS: Garbage consumes RAM memory.
If you want to know more about Garbage see here.
There is not a huge difference in the memory occupied by the operating system.
The main difference is due to the background activity. Android OS has almost no restrictions on background activity of an app, while Windows OS has some background restriction. This reduces the RAM memory occupied by the apps that run on background.
For example, In Windows mobile tiles/lockscreen are updated every 30 minutes but in Android it is for the developer to decide. Most of the apps(even the built in ones) are designed to run in background always.