ladybird/Libraries/LibGC/RootHashTable.cpp

30 lines
545 B
C++
Raw Permalink Normal View History

2026-04-09 14:33:59 +01:00
/*
* Copyright (c) 2025, Andreas Kling <andreas@ladybird.org>
* Copyright (c) 2026, Luke Wilde <luke@ladybird.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibGC/Heap.h>
#include <LibGC/RootHashTable.h>
namespace GC {
RootHashTableBase::RootHashTableBase()
: RootHashTableBase(Heap::the())
{
}
2026-04-09 14:33:59 +01:00
RootHashTableBase::RootHashTableBase(Heap& heap)
: m_heap(&heap)
{
m_heap->did_create_root_hash_table({}, *this);
}
RootHashTableBase::~RootHashTableBase()
{
m_heap->did_destroy_root_hash_table({}, *this);
}
}