mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-06 02:55:49 +03:00
Kernel: Add a little explainer comment to ListedRefCounted
This commit is contained in:
parent
ea09294351
commit
45a5cf95f9
Notes:
sideshowbarker
2024-07-18 05:35:34 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/45a5cf95f9e
@ -10,6 +10,11 @@
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
// ListedRefCounted<T> is a slot-in replacement for RefCounted<T> to use in classes
|
||||
// that add themselves to a SpinLockProtectedValue<IntrusiveList> when constructed.
|
||||
// The custom unref() implementation here ensures that the the list is locked during
|
||||
// unref(), and that the T is removed from the list before ~T() is invoked.
|
||||
|
||||
template<typename T>
|
||||
class ListedRefCounted : public RefCountedBase {
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user