Rework for git.tesses.org, GC* is std::shared_ptr maybe will fix crash during exit
Some checks failed
Build and Deploy on Tag / update-tap (push) Has been cancelled
Build and Deploy on Tag / build-arch (push) Has been cancelled

This commit is contained in:
2026-04-30 16:00:00 -05:00
parent fca18e63a6
commit 991f2a217d
78 changed files with 1243 additions and 849 deletions

View File

@@ -71,7 +71,7 @@ namespace Tesses::CrossLang
ls.GetGC()->BarrierEnd();
th->thrd =new Thread([th]()->void {
GC* gc=th->gc;
std::shared_ptr<GC> gc=th->gc;
GCList ls(gc);
ls.Add(th);
th->hasInit=true;
@@ -241,14 +241,14 @@ namespace Tesses::CrossLang
delete this->mtx;
}
void GC::RegisterEverythingCallback(std::function<void(GC* gc, TRootEnvironment* env)> cb)
void GC::RegisterEverythingCallback(std::function<void(std::shared_ptr<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);
item(this->shared_from_this(),env);
}
void GC::Collect()
{