Hi,

currently we have 2 places that hold a reference to the KStream objects:

   1. StreamProcessor::streamByUid <Map with Streams by UID>
   2. KRoom::streams <Map with Streams by UID>

Removing it from one place may or may not result removing it in the other
place.
This can lead to memory leaks. As well as those lists can get out of sync.
And you are also duplicating code in two places.

Could we explore if we can add a similar construct to the KStream that
exists for Client objects using an abstract IClientManager and an
implementation ClientManager ?

   - Similar adding a Class KStreamManager and an Interface
   IKStreamManager. And reference this single object in both places
   - IKStreamManager can define methods to get either Streams by RoomId or
   by UID or by SID. Or other abstract methods.

This could help a lot with making sure when adding or removing a KStream,
there is a single place that holds the reference.

What do you think?

Thanks,
Seb

Sebastian Wagner
https://www.linkedin.com/in/sebastianwagner/

Reply via email to