AurieFramework / YYToolkit

The definitive internal modding tool for GameMaker games
GNU Affero General Public License v3.0
81 stars 12 forks source link

Potential Memory Leak with Strings as a CallBuiltin Argument #70

Open PippleCultist opened 3 months ago

PippleCultist commented 3 months ago
std::string testStr(100000, '*');
g_ModuleInterface->CallBuiltin("variable_global_set", { "testArg", testStr });

Running this repeatedly would cause a memory leak.

Archie-osu commented 1 month ago

Looking into this in v4 on the experimental branch, however I feel that having RValues free up resources properly will be a challenge, due to FREE_RValue crashing the runner if called in the destructor.