Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

asdagfsdgas memory leaks

Okay, biggest problem that's always plagued FE7x (after reducing system load) is memory leaks. Every few months I have to come up with a bunch of debug code to find out why it's happening and fix things, but I never get everything, and have to come up with a more thorough way next time which still doesn't entirely work.
It's much better than it has been, in the past it could pick up 10MB or more per turn (about 3-10 minutes?), now it's less than 1. But it should be zero.
So I want to know how I can deal with it completely. Places to look for problems, ways to check if specific things are flooding the ram (you had 50 Sprites in memory and now you have 500, SPRITES MIGHT NOT BE GETTING DISPOSED), data types that I wouldn't expect to be the culprit, if any objects that aren't disposed still need to be freed from memory, anything.
Also an explanation of RPG::Cache, and if it can ever be part of the problem.
 
The bitmaps do not have a 4th channel. RMXP can read the 4 channels, but it does not use them, *smart ass*. RMXP uses a magic color key for transparent/ translucent colors and a seperate alpha mask for opacity. The bitmap data itself is only 3 channels.

Show me your code for the test you did.
 
Well, enterbrain is dumb then (which I guess we knew) because they don't use (or use properly) the 4th channel.

In any case, the bitmaps definitely are being leaked. Check to make sure you are disposing every bitmap after you are done using it, however, only delete them if you are not going to use that bitmap again, because if you dispose a bitmap and then ask for the same one from the cache, you will have 2 copies, because the first one won't get released right away.
 
Any memory leak is unacceptable. There are situations where you can permanently lose that memory, and you won't get it back when the program exits, it depends on how it's coded in the back end. If he leaks 1 bitmap per frame, that only takes a few minutes before it's leaked a few hundred megabytes.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top