libutils: introduce sp<T>::make
This is in preparation of doing what we did for SharedRefBase (hiding operator new) so that clients can't accidentally construct shared_ptr/unique_ptr or any other alternative memory management scheme which would conflict with RefBase. You can see what ultimately happened to SharedRefBase in frameworks/native CL 10d9ddf2e3da3ba3a425fb8396aaaec728e5fbdb. The goal for this: - promote use of 'sp<T>::make' over 'sp<T> .. = new T' - make 'operator new' a private member of RefBase Bug: 138956784 Test: libutils_test Change-Id: I47f4d28edbf7534730c7b6fb1de748dd60f34e11
Loading
Please register or sign in to comment