On Tue, Feb 28, 2023 at 6:22 AM Andres Gonzalez <andresg...@apple.com> wrote:
> > "To use `WeakPtr` or `ThreadSafeWeakPtr`, make the class inherit from > `CanMakeWeakPtr<T>` or `CanMakeThreadSafeWeakPtr<T>`, whichever is > appropriate. Note that classes that want to implement both > `ThreadSafeRefCounted` and `ThreadSafeWeakPtr` must inherit from > `ThreadSafeRefCountedAndCanMakeThreadSafeWeakPtr<>`.” > > I don’t think there is CanMakeThreadSafeWeakPtr{T>. For thread safe > WeakPtr behavior, you have to inherit from > ThreadSafeRefCountedAndCanMakeThreadSafeWeakPtr. > Good catch. It's impossible to create a thread-safe weak ptr without a thread-safe reference counter. review+. The problem of the wiki is that we can't create a PR for it. I was looking for the page since it was renamed to https://github.com/WebKit/WebKit/wiki/Smart-Pointer-Usage-Guidelines
_______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-dev