1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-24 22:37:34 +00:00

LibCore: Convert CLocalSocket to ObjectPtr

This commit is contained in:
Andreas Kling 2019-09-21 10:28:02 +02:00
parent 4298ba25c3
commit c83da29a9d
13 changed files with 83 additions and 79 deletions

View file

@ -9,6 +9,7 @@ class ObjectPtr {
public:
ObjectPtr() {}
ObjectPtr(T* ptr) : m_ptr(ptr) {}
ObjectPtr(T& ptr) : m_ptr(&ptr) {}
~ObjectPtr()
{
if (m_ptr && !m_ptr->parent())