-
Notifications
You must be signed in to change notification settings - Fork 14
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
Remove initialize
and make finalize
optional
#71
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #71 +/- ##
==========================================
- Coverage 61.55% 60.64% -0.92%
==========================================
Files 5 5
Lines 372 371 -1
==========================================
- Hits 229 225 -4
- Misses 143 146 +3 ☔ View full report in Codecov by Sentry. |
This comment was marked as resolved.
This comment was marked as resolved.
C_NULL, | ||
) | ||
ptr = ccall( | ||
(:ZSTD_createCStream_advanced, libzstd), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ZSTD_createCStream_advanced
is part of the experimental API though according to facebook/zstd#1734 these functions should not change much in the future.
I am using it because the regular ZSTD_createCStream
leads to Julia not running the finalizer before being killed by OOM.
We should not rely on the GC to finalize external resources. |
Should I try and support both explicit-free when we know the Codec cannot escape and automatic-free for more complex situations? |
initialize
and finalize
initialize
and make finalize
optional
@@ -12,4 +12,4 @@ Zstd_jll = "3161d3a3-bdf6-5164-811a-617609db77b4" | |||
[compat] | |||
TranscodingStreams = "0.9, 0.10, 0.11" | |||
Zstd_jll = "1.5.5" | |||
julia = "1.3" | |||
julia = "1.7" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
atomics require 1.7
Fixes #70 by initializing on construction and finalizing in a finalizer.