forked from Bananymous/banan-os
BAN: Mark RefPtr and WeakPtr helper destructors virtual
Also fix a bug in WeakPtr::lock() which would assert false if the underlying weak link was not initialized
This commit is contained in:
@@ -36,7 +36,7 @@ namespace BAN
|
||||
|
||||
protected:
|
||||
RefCounted() = default;
|
||||
~RefCounted() { ASSERT(m_ref_count == 0); }
|
||||
virtual ~RefCounted() { ASSERT(m_ref_count == 0); }
|
||||
|
||||
private:
|
||||
mutable uint32_t m_ref_count = 1;
|
||||
|
||||
Reference in New Issue
Block a user