1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 19:17:44 +00:00

Add WeakPtr/Weakable templates.

This commit is contained in:
Andreas Kling 2018-10-13 15:41:24 +02:00
parent b7efd92937
commit 3e9a45d7f4
4 changed files with 109 additions and 2 deletions

View file

@ -7,8 +7,6 @@ namespace AK {
template<typename T>
class Retainable {
public:
Retainable() { }
void retain()
{
ASSERT(m_retainCount);
@ -28,6 +26,7 @@ public:
}
protected:
Retainable() { }
~Retainable()
{
ASSERT(!m_retainCount);