Skip to content

Commit

Permalink
fix(analytical): Fix the garbage collection of GAE Java (#4001)
Browse files Browse the repository at this point in the history
As titled.
  • Loading branch information
zhanglei1949 authored Jan 14, 2025
1 parent 19d728e commit bb9a603
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ public void receiveMessages() {
///////////////////////////////////////////
bytesOfReceivedMsg += tmpVector.size();
}
tmpVector.delete();
logger.info(
"Frag [{}] totally Received [{}] bytes from others starting deserialization",
fragId,
Expand Down Expand Up @@ -256,5 +257,9 @@ public void postSuperstep() {
}

@Override
public void postApplication() {}
public void postApplication() {
for (int i = 0; i < fragNum; ++i) {
cacheOut[i].close();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ public FFIByteVectorOutputStream(FFIByteVector vector) {
offset = 0;
}

@Override
public void close() {
vector.delete();
}

public void resize(long size) {
vector.resize(size);
}
Expand Down

0 comments on commit bb9a603

Please sign in to comment.