Hi, I got some problems with my game, for while you play, the computer's memory usage grows more and more over time and can go over 1gb. I would like to know what are the common sources of such problems. And I will also attach a list of all the plugins I use, maybe some of them are the cause.
Excessive memory usage
RPG Maker MV SupportOK, let's start with the bugs we can already see:
Yanfly's plugins are in the wrong order, and they react rather strange to being in the wrong order.
you'll have to reorder them according to the main list (top to bottom) to prevent a number of problems, although I doubt that one of them is a memory leak because yanfly programs with better quality.
Next point - what version is your project's rpg_core.js file? Open it with a text editor and check the title line. Up until 1.4.x the core engine contained memory leaks, only 1.5.2 and 1.6.2 can be considered stable and without memory leaks.
But most probably your memory leak is the preloader plugin.
you can't have everything, and preloader functions can automatically be considered memory leaks if used even slightly wrong - because the memory leak is their main function.
A preloader tells the engine "load this file because I need it later, and don't erase it as quickly as usual. THAT needs RAM, and lot of RAM the more the preloader is used. And to stop that you need to tell the engine "Hey, the music you preloaded for me five minutes ago? I don't need it any longer, you can remove it from RAM".
Preloading speeds up the game by having files ready when needed, but it does increase memory usage unless you know exactly what you do (and if the preloader has the functions to unload, there are some simple preloaders who hope that the regular garbage detection is sufficient and give no erase function).
Yanfly's plugins are in the wrong order, and they react rather strange to being in the wrong order.
you'll have to reorder them according to the main list (top to bottom) to prevent a number of problems, although I doubt that one of them is a memory leak because yanfly programs with better quality.
Next point - what version is your project's rpg_core.js file? Open it with a text editor and check the title line. Up until 1.4.x the core engine contained memory leaks, only 1.5.2 and 1.6.2 can be considered stable and without memory leaks.
But most probably your memory leak is the preloader plugin.
you can't have everything, and preloader functions can automatically be considered memory leaks if used even slightly wrong - because the memory leak is their main function.
A preloader tells the engine "load this file because I need it later, and don't erase it as quickly as usual. THAT needs RAM, and lot of RAM the more the preloader is used. And to stop that you need to tell the engine "Hey, the music you preloaded for me five minutes ago? I don't need it any longer, you can remove it from RAM".
Preloading speeds up the game by having files ready when needed, but it does increase memory usage unless you know exactly what you do (and if the preloader has the functions to unload, there are some simple preloaders who hope that the regular garbage detection is sufficient and give no erase function).
Original thread: https://forums.rpgmakerweb.com/threads/excessive-memory-usage.138446/