[webkit-dev] Introducing WTF::makeUnique<T> and WTF::makeUniqueWithoutFastMallocCheck<T>

Alex Christensen achristensen at apple.com
Fri Aug 23 14:04:00 PDT 2019

This may be a tangent, but I wouldn’t mind replacing our use of std::unique_ptr with a smart pointer with "const T* get() const” and “T* get()” instead of std::unique_ptr’s “T* get() const”.  I think that would help us write more const-correct code.

> On Aug 23, 2019, at 9:10 AM, Darin Adler <darin at apple.com> wrote:
>> On Aug 23, 2019, at 7:26 AM, Antti Koivisto <koivisto at iki.fi> wrote:
>> Could WTF::makeUnique simply use FastMalloc by default? We could then remove most of these messy annotations.
>> This would require replacing std::unique_ptr with a type that knows how to free the objects correctly (bring back OwnPtr!) but that doesn't seem like a big deal. It wouldn't play well with mixed use of OwnPtr and new/delete but that should be avoided in any case.
> I also suggested this, and you can see Yusuke’s response here <https://bugs.webkit.org/show_bug.cgi?id=200611#c18>.
> — Darin
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-dev

More information about the webkit-dev mailing list