mkxp-z / mkxp-z

Open-source cross-platform player for (some) RPG Maker XP / VX / VX Ace games. A very heavily modified fork of mkxp. RGSS on steroids with a stupid name.
https://github.com/mkxp-z/mkxp-z/wiki
GNU General Public License v2.0
140 stars 39 forks source link

Fix a few memory leaks involving Bitmaps - ONE MAJOR #191

Open WaywardHeart opened 3 weeks ago

WaywardHeart commented 3 weeks ago

I just noticed I introduced a small oopsie in Bitmap::initFromSurface that I'm a bit surprised no one else noticed. You might want to prioritize merging this.

I also fixed a few other small memory leaks. Most of them were just potential ones involving error handling, one was involving hires fonts.

I'm also including a commit that moves the call to GFX_LOCK for disposing objects from the bindings to the dispose function in disposable.h, to address a potential thread safety issue. SDL_mutex is recursive, so it shouldn't cause any issues.