Description
I currently have an application that streams frames over grpc to flutter mobile and web clients. When running in mobile, the memory seems stable but when doing it in web it appears the data coming from GRPC never gets garbage collected and memory just continues to grow (until the browser runs out of memory). The entirety of these messages are GC'd when the stream is closed but I need to keep the stream open (live video). Is there a way to release these messages as they are processed? I'm wondering if I'm missing something simple. I know grpc-web is done over http but surely this is possible?
Note: the code I wrote is basically the same between platforms and it uses the GrpcOrGrpcWebClientChannel.
Version information:
url: "https://github.com/grpc/grpc-dart.git"
ref: f23070e
version: "3.0.1-dev"
Repro steps
- Have a GRPC server capable of streaming data to a client
- Create a GrpcOrGrpcWebClientChannel (running on web)
- Call getStream on it
- Add a listener to process data
Expected result: Data is garbage collected after being processed
Actual result: Data sticks around and causes memory to grow until out of memory.