mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-15 20:33:10 +00:00
AK: Don't unlink intrusive list elements in the destructor
Removing the element from the intrusive linked list might not be safe if doing so requires a lock. Instead this is something the caller should have done so let's verify instead that we're not on any lists.
This commit is contained in:
parent
c46ab4fbb9
commit
96b75af5d1
|
@ -320,8 +320,7 @@ namespace Detail {
|
|||
template<typename T, typename Container>
|
||||
inline IntrusiveListNode<T, Container>::~IntrusiveListNode()
|
||||
{
|
||||
if (m_storage)
|
||||
remove();
|
||||
VERIFY(!is_in_list());
|
||||
}
|
||||
|
||||
template<typename T, typename Container>
|
||||
|
|
Loading…
Reference in a new issue