mirror of
https://git.tesses.org/tesses50/crosslang.git
synced 2026-09-30 16:54:14 +00:00
Replace time-based GC with allocation-count trigger, migrate all Create factories to GCList::Create(), fix VFSPath root path, reorder TObject variant
This commit is contained in:
+4
-30
@@ -5,22 +5,8 @@
|
||||
#include <iostream>
|
||||
namespace Tesses::CrossLang {
|
||||
|
||||
TFile *TFile::Create(GCList &ls) {
|
||||
TFile *f = new TFile();
|
||||
f->icon = -1;
|
||||
std::shared_ptr<GC> _gc = ls.GetGC();
|
||||
ls.Add(f);
|
||||
_gc->Watch(f);
|
||||
return f;
|
||||
}
|
||||
TFile *TFile::Create(GCList *ls) {
|
||||
TFile *f = new TFile();
|
||||
f->icon = -1;
|
||||
std::shared_ptr<GC> _gc = ls->GetGC();
|
||||
ls->Add(f);
|
||||
_gc->Watch(f);
|
||||
return f;
|
||||
}
|
||||
TFile *TFile::Create(GCList &ls) { return ls.Create<TFile>(); }
|
||||
TFile *TFile::Create(GCList *ls) { return ls->Create<TFile>(); }
|
||||
void TFileChunk::Mark() {
|
||||
if (this->marked)
|
||||
return;
|
||||
@@ -28,20 +14,8 @@ void TFileChunk::Mark() {
|
||||
this->file->Mark();
|
||||
}
|
||||
|
||||
TFileChunk *TFileChunk::Create(GCList &ls) {
|
||||
TFileChunk *chk = new TFileChunk();
|
||||
std::shared_ptr<GC> _gc = ls.GetGC();
|
||||
ls.Add(chk);
|
||||
_gc->Watch(chk);
|
||||
return chk;
|
||||
}
|
||||
TFileChunk *TFileChunk::Create(GCList *ls) {
|
||||
TFileChunk *chk = new TFileChunk();
|
||||
std::shared_ptr<GC> _gc = ls->GetGC();
|
||||
ls->Add(chk);
|
||||
_gc->Watch(chk);
|
||||
return chk;
|
||||
}
|
||||
TFileChunk *TFileChunk::Create(GCList &ls) { return ls.Create<TFileChunk>(); }
|
||||
TFileChunk *TFileChunk::Create(GCList *ls) { return ls->Create<TFileChunk>(); }
|
||||
void TFile::Mark() {
|
||||
if (this->marked)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user