1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-18 15:15:08 +00:00
Commit graph

2 commits

Author SHA1 Message Date
Andreas Kling
c83da29a9d LibCore: Convert CLocalSocket to ObjectPtr 2019-09-21 15:25:08 +02:00
Andreas Kling
c34fd10b5b LibCore: Introduce ObjectPtr, a step towards reference-counted CObject
Long-term we should use reference counting for the CObject hierarchy.
Since we've already accumulated a fair amount of code, this is quite a
large task, so I'm breaking it into some steps.

So, ObjectPtr is a "smart" pointer for CObject-derived types.
It becomes null when moved from, and will destroy unparented CObjects
in its destructor.

The idea here is to convert the codebase over to ObjectPtr piece by
piece, and then when everything is moved and CObject itself refactored
for ref-counting, we can just replace ObjectPtr with RefPtr everywhere.
2019-09-20 15:19:11 +02:00