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:
parent
b7efd92937
commit
3e9a45d7f4
4 changed files with 109 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue