Cleaning up shared data
I have a filter that places something in shared data when a request comes in, and retrieves it when the corresponding response goes out. After that, I'd like to delete the entry in shared data since it will no longer be used, and, I assume, eventually waste all the memory. Is there any mechanism to clean up the shared data?
yeah actually this is a valid request, but the current ABI does not have something like delete_shared_data so this needs a ABI change. cc @PiotrSikora
I image we could delete a data when set_shared_data("key", nullptr) but this would change the behavior in the way that we couldn't have "empty data" in the shared data.
@mathetake I am not sure exactly how the shared data works, but wouldn't that also wind up keeping track of all the different keys even though they are mapped to only null pointers? You'd still have keys that aren't freed.