mirror of
https://git.tesses.org/tesses50/crosslang.git
synced 2026-09-30 16:54:14 +00:00
Rework for git.tesses.org, GC* is std::shared_ptr maybe will fix crash during exit
This commit is contained in:
+3
-9
@@ -2,21 +2,15 @@
|
||||
|
||||
namespace Tesses::CrossLang
|
||||
{
|
||||
GCList::GCList(GC* gc)
|
||||
GCList::GCList(std::shared_ptr<GC> gc)
|
||||
{
|
||||
gc->BarrierBegin();
|
||||
this->gc = gc;
|
||||
gc->SetRoot(this);
|
||||
gc->BarrierEnd();
|
||||
}
|
||||
GCList::GCList(GC& gc)
|
||||
{
|
||||
gc.BarrierBegin();
|
||||
this->gc = &gc;
|
||||
gc.SetRoot(this);
|
||||
gc.BarrierEnd();
|
||||
}
|
||||
GC* GCList::GetGC()
|
||||
|
||||
std::shared_ptr<GC> GCList::GetGC()
|
||||
{
|
||||
return this->gc;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user