exeldro / obs-replay-source

Replay source for OBS studio
GNU General Public License v2.0
143 stars 20 forks source link

Possible memory leak #24

Closed ruggi99 closed 3 years ago

ruggi99 commented 3 years ago

Possible memory leak

Hi. I love this plugin and I started playing with this a few days ago. I spotted a possible memory leak in RAM but I'm not sure. Steps to reproduce:

Cannot assure that the problem is related to this plugin, but it seems to. Note: Currently I'm using transition table plugin and OBS Live plugin

Let me know

ruggi99 commented 3 years ago

Also spotted this weird behavior like in the video below. The video starts with the Replay Source disabled (by hotkey). Then I enable it (with another hotkey) and the RAM grows up to about 3GB. Then I load a replay (with a hotkey) and RAM grows up to 6GB. Every time I load the replay, RAM decreases to 3GB and increases up to 6GB again. If now I disable the replay, RAM decreases to 3GB. I can't figure out where are the "first" 3 GB. I only have a Replay Source. All tests are made with the installed artifact of the latest Action (with the installer for Windows). Can you help me?

Thank you

https://user-images.githubusercontent.com/25064808/108215336-85f9aa00-7131-11eb-8753-8a1c74324bf3.mp4

Note: registered with another instance of OBS

exeldro commented 3 years ago

when you enable the replay buffer the 3GB is used on the filter on the source you are capturing a replay When load replay is pressed all data from the filter is moved to the replay source The filter will go back up to full buffer size so that makes 6GB total. when you disable the replay source via a hotkey it removes the 3GB of the filter, to remove the 3GB of the replay source you need the clear or the remove hotkey

ruggi99 commented 3 years ago

Ok, understood, thank you. I can bind the same hotkey for disabling and clearing and it should work. Instead for the first problem (that is not related to the second), do you encounter that? If you want a video let me know.

Thank you