DoubleDeez / MDFramework

A multiplayer C# game framework for Godot 3.4 Mono.
https://discord.gg/UH49eHK
MIT License
77 stars 13 forks source link

Bug: Clean up buffered values #34

Closed Beider closed 4 years ago

Beider commented 4 years ago

In theory buffered values could now last for the duration of the connection if something ends in the buffer but the node never arrives. We should add a date stamp to each buffer for when the latest message arrived, if a certain amount of time expired (could be something like 2 minutes~) then clean up the buffer. This is unlikely to occur so maybe we should consider not adding this at all since it will result in extra processing time spent to check quite often. Is this extra processing time worth the potential memory leak for the duration of the session?

DoubleDeez commented 4 years ago

I don't think we need this in the end. At best maybe we just have a way to opt-in to tracking its state so we can know if it's an issue or not

Beider commented 4 years ago

Yeah that is probalby wiser, so let's just add an optional OnScreenDebug for how many things are in the buffer. That would be easy enough to add.

Beider commented 4 years ago

This will be fixed in a collection bug I will commit later, fix is already on this branch.

https://github.com/Beider/MDFramework/tree/feature/recurisvemdreplicated