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

Add finalizer to ZStream and make TranscodingStreams.finalize a noop #97

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nhz2
Copy link
Member

@nhz2 nhz2 commented Feb 3, 2025

Fixes #48 and fixes #88 by porting JuliaIO/CodecBzip2.jl#43 to this package.

According to https://www.zlib.net/manual.html#Basic

If zlib is used in a multi-threaded application, zalloc and zfree must be thread safe. In that case, zlib is thread-safe.

So, there shouldn't be any thread safety issues with the finalizer here.

Copy link

codecov bot commented Feb 3, 2025

Codecov Report

Attention: Patch coverage is 96.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 84.84%. Comparing base (f29c86f) to head (f50e6f9).

Files with missing lines Patch % Lines
src/libz.jl 91.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #97      +/-   ##
==========================================
+ Coverage   83.51%   84.84%   +1.33%     
==========================================
  Files           4        4              
  Lines         188      198      +10     
==========================================
+ Hits          157      168      +11     
+ Misses         31       30       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

Memory leak if decompressed stream is not explicitly closed transcode failing if codec is not initialized
1 participant