Finish process

This commit is contained in:
2025-01-12 19:33:43 -06:00
parent 62c1aa6d3b
commit 01a034a77b
6 changed files with 195 additions and 28 deletions

View File

@ -226,6 +226,16 @@ namespace Tesses::CrossLang
for(auto item : objects) delete item;
delete this->mtx;
}
void GC::RegisterEverythingCallback(std::function<void(GC* gc, TRootEnvironment* env)> cb)
{
this->register_everything.push_back(cb);
}
void GC::RegisterEverything(TRootEnvironment* env)
{
for(auto item : this->register_everything)
item(this,env);
}
void GC::Collect()
{
this->BarrierBegin();