-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Worker tests: use unique pointers when possible #1421
Conversation
(WIP) ### Details - Avoid having allocated pointers outside `unique_ptr` pointers. - So caution with all those mediasoup `Parse()` static methods that return an allocated pointer. - Working on `TestXr.cpp`. - `TestRtpStreamSend.cpp`: Use `unique_ptr` instead of `shared_ptr`.
Questions
|
Because a
That pointer is owned by the caller of |
I don't understand. I literally mean that I replaced some shared_ptr with unique_ptr in that files and it compiles, tests pass and no ASAN warnings (in that test file). |
@jmillan, ongoing changes in
My guess is that we are creating a XR packet and we are passing reports to it created with |
…acket or report class
Confirmed, and fixed here 281054c |
@ibc, this PR is ready to merge, plus there are 0 issues when running |
My aim in this PR is to use unique/share_ptr in all test files, not just in |
@jmillan thanks a lot for your commits. Just one thing, we don't need to include |
This is done. I've enabled test-asan-address in CI (only for Linux) and will merge if CI passes. |
(WIP)
Details
unique_ptr
pointers.Parse()
static methods that return an allocated pointer.TestRtpStreamSend.cpp
: Useunique_ptr
instead ofshared_ptr
.