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

Cleanup xrefObj on Dispose #144

Merged
merged 1 commit into from
Apr 27, 2024
Merged

Cleanup xrefObj on Dispose #144

merged 1 commit into from
Apr 27, 2024

Conversation

anisite
Copy link
Contributor

@anisite anisite commented Apr 27, 2024

Hello, here is a pull request to reduce memory usage after cleanup. In my tests with large files, memory usage at the end is 377 MB instead of 703 MB.

Fixes #143

Copy link

what-the-diff bot commented Apr 27, 2024

PR Summary

  • Modification of PdfReader.cs file
    The PdfReader.cs file was updated, suggesting the team is refining the way we handle PDF files in our system.

  • Addition of Dispose() method to PdfReader class
    A new functionality was introduced to properly discard any unused or redundant resources occupied by the PdfReader. This will help optimize our system's performance and efficiency.

  • Enrichment of Dispose() method
    The Dispose() method now includes a step to clear out the _xrefObj list, ensuring our system avoids storing unnecessary or irrelevant data, again contributing to further optimization.

  • Whitespace Adjustment
    There was a minor formatting adjustment, with a new line added at the end of the file. Although a subtle change, this could enhance the readability and maintenance of the code.

@VahidN VahidN merged commit 8803ef9 into VahidN:master Apr 27, 2024
2 checks passed
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.

Manipulating many large files use a large amount of memory
2 participants