nasa / bplib

Apache License 2.0
27 stars 13 forks source link

RAM storage service requires flush before closing channel #18

Open jpswinski opened 5 years ago

jpswinski commented 5 years ago

The store/ram.c module does not keep track of data that has been dequeued. Therefore if an application closes a channel without relinquishing all dequeued bundles, those bundles are left as dangling pointers and result in a memory leak.

jpswinski commented 4 years ago

This is an artifact of wanting the ability to recover storage. The fact that the RAM storage service does not use persistent storage means that closing the channel leaves the pointers dangling with no way to recover. Other storage services will keep the data around so that it can be scanned and recovered at a later time.

This should be documented and then closed.