Ji Liu created ARROW-6898: ----------------------------- Summary: [Java] Fix potential memory leak in ArrowWriter and several test classes Key: ARROW-6898 URL: https://issues.apache.org/jira/browse/ARROW-6898 Project: Apache Arrow Issue Type: Bug Components: Java Reporter: Ji Liu Assignee: Ji Liu
ARROW-6040 fixed the problem that dictionary entries are required in IPC streams even when empty, which only writes dictionaries when there are at least one batch. In this way, if we write empty stream and invoke ArrowWriter#close, the dictionaries are not closed leading to memory leak (they are closed after the write operation), and it’s really hard to debug, this problem was found by {{TestArrowReaderWriter#testEmptyStreamInStreamingIPC}} when I tried to close allocator after the test. Besides, there are several test classes have potential memory leak without closing allocator/vector/buf etc. -- This message was sent by Atlassian Jira (v8.3.4#803005)