Skip to content

Conversation

@FileEX
Copy link
Member

@FileEX FileEX commented Nov 14, 2025

Fixed #4288

After updating the archive information and then calling the streaming CStreamingSA::ReInit (engineRestreamWorld), the RwObject associated with the original archive was “lost”, and a new one was loaded for the new archive.

Sequence:

link dff -> restream -> keep old RwObject -> create RwObject for new archive

Restart resource:
restore dff (unlink) -> restream -> keep previously loaded new RwObjects -> create RwObject from original archive

With every subsequent call to engineImageLinkDFF, new RwObjects were created without removing the previous ones. As a result, after each resource restart or reconnect, the number of RwObjects kept increasing, depending on how many models were inside the IMG. This is what caused the memory leak.

@FileEX FileEX added the bugfix Solution to a bug of any kind label Nov 14, 2025
@Dutchman101
Copy link
Member

Good job, but fingers crossed it won't break anything that wasn't immediately obvious in your local tests.

@Dutchman101 Dutchman101 self-assigned this Nov 15, 2025
@Dutchman101 Dutchman101 self-requested a review November 15, 2025 00:34
@Dutchman101 Dutchman101 merged commit 3308359 into multitheftauto:master Nov 15, 2025
8 checks passed
MTABot pushed a commit that referenced this pull request Nov 15, 2025
3308359 Fix memory leak in engineImageLinkDFF (#4544)
MTABot pushed a commit that referenced this pull request Nov 15, 2025
9273b0d Fix memory leak in engineImageLinkDFF (#4544)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Solution to a bug of any kind

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Image streaming memory leak

2 participants