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:
Gunnar Beutner 2021-05-19 23:42:28 +02:00 committed by Andreas Kling
parent c46ab4fbb9
commit 96b75af5d1

View file

@ -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>