This PR modernizes the memory management architecture in SRS by refactoring RTMP message handling to use shared pointers (SrsSharedPtr<SrsMemoryBlock>) instead of manual memory management. This change improves memory safety, reduces the risk of memory leaks, and provides a cleaner abstraction for message payload handling. * Introduced `SrsMemoryBlock`: A dedicated class for managing memory buffers with size information * Replaced manual memory management: `SrsCommonMessage` and `SrsSharedPtrMessage` now use `SrsSharedPtr<SrsMemoryBlock>` instead of raw pointers * Updated `SrsRtpPacket`: Now uses `SrsSharedPtr<SrsMemoryBlock>` for shared buffer management --------- Co-authored-by: OSSRS-AI <winlinam@gmail.com> |
||
|---|---|---|
| .. | ||
| 3rdparty | ||
| auto | ||
| conf | ||
| doc | ||
| etc/init.d | ||
| gdb | ||
| ide/srs_clion | ||
| packaging/redhat | ||
| research | ||
| scripts | ||
| src | ||
| usr/lib/systemd/system | ||
| .gitignore | ||
| AUTHORS.md | ||
| AUTHORS.txt | ||
| configure | ||
| Dockerfile.builds | ||
| Dockerfile.cov | ||
| Dockerfile.pkg | ||
| Dockerfile.test | ||