srs icon indicating copy to clipboard operation
srs copied to clipboard

issue#4364: try to fix memory leak for daemon run.

Open suzp1984 opened this issue 6 months ago • 1 comments

This PR is try to workaround #4364. The memory continues increase problem didn't appear in the PR, but the root cause is not yet founded, by moving global initialize code into srs_pre_global_initialize(), It seems those 2 instructions may trigger this memory issue.

    _srs_log = new SrsFileLog();
    _srs_context = new SrsThreadContext();

suzp1984 avatar Jun 04 '25 23:06 suzp1984

It doesn't make sense because they are two variables with fixed memory; they should not cause the memory to increase over time.

winlinvip avatar Jun 05 '25 10:06 winlinvip