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 {
|
|
|
|
|
|
2026-05-19 21:06:11 +02:00
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|