Skip to content

Commit

Permalink
Merge pull request #50 from Intel-HLS/gp_fix_inflate_delfate_gc
Browse files Browse the repository at this point in the history
Fix issue with inflater/deflater garbage collection
  • Loading branch information
George Powley authored Mar 29, 2017
2 parents 213fd44 + 818b5ef commit 7c27959
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
5 changes: 4 additions & 1 deletion src/main/java/com/intel/gkl/compression/IntelDeflater.java
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ public boolean finished() {
*/
@Override
public void end() {
endNative();
if(lz_stream != 0) {
endNative();
lz_stream = 0;
}
}
}
10 changes: 2 additions & 8 deletions src/main/java/com/intel/gkl/compression/IntelInflater.java
Original file line number Diff line number Diff line change
Expand Up @@ -178,15 +178,9 @@ public boolean finished() {
*/
@Override
public void end() {

if(lz_stream !=0)
{
if(lz_stream != 0) {
endNative();
lz_stream=0;
lz_stream = 0;
}
}

@Override
protected void finalize() {}

}

0 comments on commit 7c27959

Please sign in to comment.