Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 230397ef authored by Jintao Zhu's avatar Jintao Zhu
Browse files

use sp<AudioEffect> instead of unique_ptr<AudioEffect>



As a child class of RefBase, an AudioEffect object should be held by sp<> rather than by unique_ptr<>.

If you use unique_ptr<> to hold it, then later, someone else, on the other hand, may probably use sp<> to hold it, then in the future, the AudioEffect object may be deleted two times: one is from sp<>, the other from unique_ptr<>.

This may be detected by the destructor of class RefBase, with the log complaint "RefBase: Explicit destruction,..."

Test: monkey test for one day and one night

Signed-off-by: default avatarJintao Zhu <zhujtcsieee@gmail.com>
Change-Id: I52e1df86899dfd8265aa80b4d3423936f66fcd47
parent 93aed30e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment