Commit graph

8 commits

Author SHA1 Message Date
Wayward Heart
cf43cf005b Don't store Exception objects' messages on the stack. 2024-08-27 22:20:36 -05:00
Wayward Heart
99ad4fa636 Throw exceptions for Resets and Exits instead of directly raising.
While this does close small memory leaks, this is mostly for threading reasons. We're not supposed to call rb_raise with the gvl released, and calling rb_raise prevents GFX_UNLOCK from being called, which would cause problems for any games that want to call graphical operations in multiple threads should the user reset.

We're also now calling Graphics.__reset__ and Audio.__reset__ via eval instead of directly calling the functions, in case a game wants to hook them.
2024-08-02 09:26:51 -05:00
Wayward Heart
a73f9ccc1f Prevent memory leaks from rb_raise
rb_raise calls longjmp, which bypasses C++ destructors, and also keeps the error for catch blocks from being unallocated if passed by reference, which we do for exceptions.

Some of the calls I left can still jump out of try blocks, which you're not supposed to do, but there shouldn't be any objects with destructors initialized at those points so it's probably fine.
2024-08-02 09:26:51 -05:00
Amaryllis Kulla
fae7fa9c4e
Update ancurio's copyright notice (#29) 2023-10-04 15:07:34 -04:00
Struma
f98b1e031f Reorganize src dir 2020-11-21 01:36:24 -05:00
Struma
94e063c6c0 OLD_RUBY -> RAPI_MAJOR/RAPI_MINOR/RAPI_TEENY/RAPI_FULL 2020-02-26 12:44:37 -05:00
Struma
dd0f3ade91 Allow specifying ruby install manually 2020-02-25 05:35:30 -05:00
Inori
7f3a548755 Remove mruby and null bindings 2019-07-31 08:47:44 -04:00
Renamed from binding-mri/binding-util.cpp (Browse further)