feat(furvm): add collect function to context
This commit is contained in:
@@ -1,7 +1,16 @@
|
||||
#include "furvm/context.hpp"
|
||||
|
||||
#include "furvm/thing.hpp" // IWYU pragma: keep
|
||||
|
||||
namespace furvm {
|
||||
|
||||
context::context() {}
|
||||
|
||||
void context::collect() {
|
||||
for (auto& ref : m_things) {
|
||||
if (ref->reference_count() != 0) continue;
|
||||
ref = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace furvm
|
||||
Reference in New Issue
Block a user