fix: Refactor checks for manifest data when binding for c2pa_reader_with_manifest_data_and_stream is used#287
Merged
tmathern merged 2 commits intoJun 22, 2026
Conversation
c2pa_reader_with_manifest_data_and_stream is used
gpeacock
reviewed
Jun 22, 2026
| "leaked_bytes": 3210242, | ||
| "total_allocations": 111383 | ||
| }, | ||
| "reader_manifest_data_context": { |
Member
There was a problem hiding this comment.
quite a leap here in peak_bytes and total_allocations, do you know why?
gpeacock
reviewed
Jun 22, 2026
|
|
||
| if baseline and name in baseline: | ||
| b = baseline[name] | ||
| # Only leaked_bytes gates the run. It is the leak signal and is |
Member
There was a problem hiding this comment.
this makes we wonder if we should expose an API for c_ffi leaked bytes. But I'm not sure exactly how that would work.
gpeacock
approved these changes
Jun 22, 2026
gpeacock
left a comment
Member
There was a problem hiding this comment.
Were we having leaks here? How did you know about them?
Collaborator
Author
Yes, we did have one leak recently in c2pa-python in general. A Builder handle which was not released when it should. Accumulated 49 bytes over time on each Builder instance. So I've been adding scenarios since then when I make change to make sure heap usage stays flat. |
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.
Changes in this pull request
c2pa_reader_with_manifest_data_and_stream(binding was already there, this improve on testing and does a refactor)Checklist
TO DOitems (or similar) have been entered as GitHub issues and the link to that issue has been included in a comment.