AK: Call deref_base() on the pointer type
This makes it easier to print logs when unrefing a RefCounted type without rebuilding the world.
This commit is contained in:
parent
2e3c59f791
commit
e31fe7804c
1 changed files with 1 additions and 1 deletions
|
|
@ -59,7 +59,7 @@ public:
|
|||
{
|
||||
auto* that = const_cast<T*>(static_cast<T const*>(this));
|
||||
|
||||
auto new_ref_count = deref_base();
|
||||
auto new_ref_count = that->deref_base();
|
||||
if (new_ref_count == 0) {
|
||||
if constexpr (requires { that->will_be_destroyed(); })
|
||||
that->will_be_destroyed();
|
||||
|
|
|
|||
Loading…
Reference in a new issue