Skip to content

frontend: Fix memory leak with --disable-missing-files-check - #12628

Open
fzwoch wants to merge 1 commit into
obsproject:masterfrom
fzwoch:fix-missing-files-leak
Open

frontend: Fix memory leak with --disable-missing-files-check#12628
fzwoch wants to merge 1 commit into
obsproject:masterfrom
fzwoch:fix-missing-files-leak

Conversation

@fzwoch

@fzwoch fzwoch commented Sep 15, 2025

Copy link
Copy Markdown
Contributor

The missing files dialog takes responsibility of freeing the missing files list. When --disable-missing-files-check is used we need to drop this object or we leak it.

Someone reported this on Discord.

Description

Fixes some memory leak when --disable-missing-files-check is being used.

Motivation and Context

From a report from Discord. When --disable-missing-files-check is being used the memory checker reports one block of memory being leaked when OBS is shut down.

How Has This Been Tested?

Run with --disable-missing-files-check. Memory leak counter returns to 0.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

The missing files dialog takes responsibility of freeing the
missing files list. When --disable-missing-files-check is used
we need to drop this object or we leak it.
@WizardCM WizardCM added the kind/bug Categorizes issue or PR as related to a bug. label Sep 20, 2025
@RytoEX

RytoEX commented Sep 22, 2025

Copy link
Copy Markdown
Member

A different attempt at fixing this is #11075.

cc @PatTheMav since he gave feedback on that one. Would like to know if either approach is acceptable.

@PatTheMav

Copy link
Copy Markdown
Member

A different attempt at fixing this is #11075.

cc @PatTheMav since he gave feedback on that one. Would like to know if either approach is acceptable.

My gut reaction is to prefer #11075 as that one avoids allocating memory in the first place.

@RytoEX

RytoEX commented Sep 25, 2025

Copy link
Copy Markdown
Member

My gut reaction is to prefer #11075 as that one avoids allocating memory in the first place.

Someone will probably have to adopt that one and bring it over the finish line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Categorizes issue or PR as related to a bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants