### Describe the bug, including details regarding any error messages, version, and platform. This is a follow up of https://github.com/apache/arrow/issues/14890. `ListSubfieldEncoder` and `StructSubfieldEncoder` may leak memory as well. ### Component(s) Java