Skip to content

Commit

Permalink
Merge pull request #200 from subes/master
Browse files Browse the repository at this point in the history
More memory leakage with callbacks fixed
  • Loading branch information
RuedigerMoeller authored Jun 19, 2017
2 parents d68e911 + 1595432 commit 469d4c0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/org/nustaq/serialization/FSTObjectInput.java
Original file line number Diff line number Diff line change
Expand Up @@ -963,6 +963,7 @@ public void resetForReuseCopyArray(byte bytes[], int off, int len) throws IOExce
getCodec().reset();
objects.clearForRead(conf);
getCodec().resetToCopyOf(bytes, off, len);
callbacks = null; //fix memory leak on reuse from default FstConfiguration
}

public void resetForReuseUseArray(byte bytes[]) throws IOException {
Expand All @@ -975,6 +976,7 @@ public void resetForReuseUseArray(byte bytes[], int len) throws IOException {
}
objects.clearForRead(conf);
getCodec().resetWith(bytes, len);
callbacks = null; //fix memory leak on reuse from default FstConfiguration
}

public final int readFInt() throws IOException {
Expand Down

0 comments on commit 469d4c0

Please sign in to comment.