2024-02-22 09:18:31 -03:00
|
|
|
/*
|
2024-10-04 08:19:50 -03:00
|
|
|
* Copyright (c) 2024, Andreas Kling <andreas@ladybird.org>
|
2024-02-22 09:18:31 -03:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
|
*/
|
|
|
|
|
|
2024-11-14 12:01:23 -03:00
|
|
|
#include <LibGC/ConservativeVector.h>
|
|
|
|
|
#include <LibGC/Heap.h>
|
2024-02-22 09:18:31 -03:00
|
|
|
|
2024-11-14 12:01:23 -03:00
|
|
|
namespace GC {
|
2024-02-22 09:18:31 -03:00
|
|
|
|
2026-05-19 15:55:11 -03:00
|
|
|
ConservativeVectorBase::ConservativeVectorBase()
|
|
|
|
|
: ConservativeVectorBase(Heap::the())
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2024-02-22 09:18:31 -03:00
|
|
|
ConservativeVectorBase::ConservativeVectorBase(Heap& heap)
|
|
|
|
|
: m_heap(&heap)
|
|
|
|
|
{
|
|
|
|
|
m_heap->did_create_conservative_vector({}, *this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ConservativeVectorBase::~ConservativeVectorBase()
|
|
|
|
|
{
|
|
|
|
|
m_heap->did_destroy_conservative_vector({}, *this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|