1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:37:46 +00:00

AK+Kernel: Remove one_ref_left() footgun

This mechanism was unsafe to use in any multithreaded context, since
the hook function was invoked on a raw pointer *after* decrementing
the local ref count.

Since we don't use it for anything anymore, let's just get rid of it.
This commit is contained in:
Andreas Kling 2022-01-11 01:05:18 +01:00
parent 08e927f084
commit a4b4b358ff
4 changed files with 0 additions and 15 deletions

View file

@ -77,10 +77,6 @@ public:
delete that;
return true;
}
if (new_ref_count == 1) {
if constexpr (requires { that->one_ref_left(); })
that->one_ref_left();
}
return false;
}
};