You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hop.apache.org by ha...@apache.org on 2022/02/25 08:35:44 UTC
[hop] branch master updated: HOP-3792 TableOutput: allow data structures to be garbage collected properly
This is an automated email from the ASF dual-hosted git repository.
hansva pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hop.git
The following commit(s) were added to refs/heads/master by this push:
new 29e4c46 HOP-3792 TableOutput: allow data structures to be garbage collected properly
new 96fc2de Merge pull request #1396 from sramazzina/MEMORYLEAK
29e4c46 is described below
commit 29e4c464e02c1a4916d1c0ce693770d20db9fd47
Author: sergio.ramazzina <se...@serasoft.it>
AuthorDate: Fri Feb 25 08:43:27 2022 +0100
HOP-3792 TableOutput: allow data structures to be garbage collected properly
---
.../apache/hop/pipeline/transforms/tableoutput/TableOutput.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/plugins/transforms/tableoutput/src/main/java/org/apache/hop/pipeline/transforms/tableoutput/TableOutput.java b/plugins/transforms/tableoutput/src/main/java/org/apache/hop/pipeline/transforms/tableoutput/TableOutput.java
index 73150a7..16fa5f2 100644
--- a/plugins/transforms/tableoutput/src/main/java/org/apache/hop/pipeline/transforms/tableoutput/TableOutput.java
+++ b/plugins/transforms/tableoutput/src/main/java/org/apache/hop/pipeline/transforms/tableoutput/TableOutput.java
@@ -576,10 +576,16 @@ public class TableOutput extends BaseTransform<TableOutputMeta, TableOutputData>
emptyAndCommitBatchBuffers(true);
} finally {
data.db.disconnect();
+ // Free data structures to enable GC
data.db = null;
+ data.preparedStatements = null;
+ data.batchBuffer = null;
+ data.commitCounterMap = null;
+ data.outputRowMeta = null;
}
- super.dispose();
}
+
+ super.dispose();
}
// Force the batched up rows to the database in a single-threaded scenario