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

register cpc teardown functions for std::atexit #412

Merged
merged 7 commits into from
Dec 21, 2023
Merged

Conversation

jmalkin
Copy link
Contributor

@jmalkin jmalkin commented Dec 21, 2023

std::atexit() is apparently considered a legacy C thing since C++ should ideally be able to use static objects. Regardless, this worked to clean up: When I tested in valgrind we finally had a clean report for CPC for the first time ever.

Copy link

Pull Request Test Coverage Report for Build 7282853175

  • 6 of 6 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.001%) to 98.939%

Totals Coverage Status
Change from base Build 7205830121: 0.001%
Covered Lines: 16039
Relevant Lines: 16211

💛 - Coveralls

cleaner solution with no extra bool and check
Rearrange for better logical grouping
be explicit that we're ignoring the result of `atexit()` -- if it fails we'll just "leak" a bit of memory at shutdown, which we've been doing anyway so far.
use the right variable name
check if we can remove the extra template from the friend declaration of get_compressor()
Fix simplified friend declaration
@jmalkin jmalkin merged commit f58c622 into master Dec 21, 2023
7 checks passed
@jmalkin jmalkin deleted the cpc_teardown branch December 21, 2023 03:33
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.

2 participants