Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interface: Fix memory leak on opening ROMs, added function to manually free ROMs #518

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

theCapypara
Copy link
Contributor

As a side note, at a quick glance it seems that this also affects the Windows and Linux GUI frontends (didn't check Mac), since I couldn't find NDS_FreeROM(); being called there when opening a new ROM. The Windows GUI only seems to free the old ROM when explicitly told to close the ROM. However this is only from a quick glance at the code, I didn't actually do more investigation, but it might be worth to check.

@theCapypara theCapypara requested a review from rofl0r March 30, 2022 16:34
@theCapypara theCapypara requested a review from rofl0r March 30, 2022 18:18
clear_savestates();
i = NDS_LoadROM(filename);
if (i > 0) {
rom_opened = true;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if rom_opened was already true, it will stay true even if i <= 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants