Repository navigation
Conversation
Member
|
Please rebase after #75 |
Member
|
Feel free to open a single PR with the 3 commits, if simpler for you |
php_mimepart_remove_from_parent() deleted the child's entry from the parent's children table, which has no destructor, without dropping the reference that entry held. A removed part therefore stayed allocated until the end of the request, so a loop that builds a message and removes a part grows memory without bound in a long-running process.
iliaal
force-pushed
the
fix-mimemessage-remove-leak
branch
from
November 6, 2026 13:20
849fcfa to
32d09d0
Compare
Member
Author
|
Rebased |
Member
|
Thanks, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MimeMessage::remove()deleted the child's entry from the parent's children table, which has no destructor, without dropping the reference the entry held, so every removed part stayed allocated until the end of the request. A loop that parses a message and removes a part grows without bound in a long-running worker (about 1.7 KB per iteration for a message with a 1 KB part). Depends on #75, which makes it safe for a removed part to be freed; only the last commit is new here.