Closed suzp1984 closed 3 months ago
related to #4092
https://github.com/ossrs/srs/blob/16e569d82357757ddac6ef91d7a5fe7837319909/trunk/src/app/srs_app_config.cpp#L71-L82
static SrsConfDirective* dir removed, this static var here is to avoid the memory leak, I add the SrsConfDirective instance to the env_dirs directive container, which will destroy itself inside SrsConfig destructor.
static SrsConfDirective* dir
SrsConfDirective
env_dirs
SrsConfig
related to #4092
https://github.com/ossrs/srs/blob/16e569d82357757ddac6ef91d7a5fe7837319909/trunk/src/app/srs_app_config.cpp#L71-L82
static SrsConfDirective* dir
removed, this static var here is to avoid the memory leak, I add theSrsConfDirective
instance to theenv_dirs
directive container, which will destroy itself insideSrsConfig
destructor.