As per the docs, in Batch mode, dynamic memory allocation is avoided by storing messages being processed in ByteBuffers via Unsafe methods.
Couldn't find any docs describing mem mgmt in Streamingn mode. So... - Am wondering if this is also the case with Streaming ? - If so, how does Flink detect that an object is no longer being used and can be reclaimed for reuse once again ? -roshan