Memory leak when I put for recording (smart recording)

1.smart recording memory leaks are not detected using valgrind, can you share how you detected them?

valgrind --tool=memcheck --leak-check=full --num-callers=100 --show-leak-kinds=definite,indirect --track-origins=yes python3 sr_test.py "rtsp://xxxxx"

2.There is no memory leak here. In the FAQ, there is the following code to release memory

   # release native memory
    pyds.free_gbuffer(sessionid)
    pyds.free_gbuffer(sr_user_context_buf)

You seem to have provided some legacy code, please refer to this FAQ.