mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:07:34 +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
1 changed files with 1 additions and 2 deletions
|
@ -320,8 +320,7 @@ namespace Detail {
|
||||||
template<typename T, typename Container>
|
template<typename T, typename Container>
|
||||||
inline IntrusiveListNode<T, Container>::~IntrusiveListNode()
|
inline IntrusiveListNode<T, Container>::~IntrusiveListNode()
|
||||||
{
|
{
|
||||||
if (m_storage)
|
VERIFY(!is_in_list());
|
||||||
remove();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, typename Container>
|
template<typename T, typename Container>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue