Fix bugs created by shared_ptr

This commit is contained in:
2025-09-29 04:29:52 -05:00
parent d2b2720ecb
commit bbe0a1cefc
6 changed files with 38 additions and 11 deletions

View File

@@ -501,15 +501,19 @@ namespace Tesses::CrossLang {
}
}
TObjectVFS::~TObjectVFS()
void TObjectVFS::Close()
{
TDictionary* dict;
if(GetObjectHeap(this->obj, dict))
{
GCList ls(this->ls->GetGC());
dict->CallMethod(ls,"Dispose",{});
dict->CallMethod(ls,"Close",{});
}
}
TObjectVFS::~TObjectVFS()
{
Close();
delete this->ls;
}