Closed norihiro closed 6 months ago
Are you sure it leaks currently? I very explicitly chose OBSService as there was weird behavior with service reference counting that required it, but don't remember why.
I've added steps to reproduce in the description of this PR.
Something I noticed weird is that SetStreamServiceSettings
at first time will leak the memory but 2nd time and later won't.
This is because SetStreamServiceSettings
will not re-create the object if the service-type matches.
If you have a doubt for the reference count, how about using obs_service_t *
instead of OBSService
and intentionally calls obs_service_release
?
Description
Replaced
OBSService
type withOBSServiceAutoRelease
inRequestHandler::SetStreamServiceSettings
.Motivation and Context
Memory leaks when setting streaming service using obs-websocket.
How Has This Been Tested?
Tested OS(s): Ubuntu 22.04
Steps to test the memory-leak is as below.
Optimize just for recording, I will not be streaming
.Types of changes
Checklist:
master
or arelease/*
branch.