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