From 2d613e9aac3fea33554d87854cda8f40f8e62f98 Mon Sep 17 00:00:00 2001 From: Mike Nolan Date: Tue, 30 Sep 2025 23:03:40 -0500 Subject: [PATCH] Add fixes to webapp --- .../res/cppfiletemplate.cpp | 13 +++++++++---- Tesses.CrossLang.Shell/src/webapp-test.tcross | 3 +++ Tesses.CrossLang.Shell/src/webapp.tcross | 2 ++ 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Tesses.CrossLang.BuildEssentials/res/cppfiletemplate.cpp b/Tesses.CrossLang.BuildEssentials/res/cppfiletemplate.cpp index 46fa5cd..052e6c5 100644 --- a/Tesses.CrossLang.BuildEssentials/res/cppfiletemplate.cpp +++ b/Tesses.CrossLang.BuildEssentials/res/cppfiletemplate.cpp @@ -4,13 +4,13 @@ using namespace Tesses::Framework; using namespace Tesses::CrossLang; int main(int argc, char** argv) { + TF_InitWithConsole(); std::string name = argv[0]; - Tesses::Framework::Filesystem::LocalFilesystem fs; - Tesses::Framework::Filesystem::VFSPath exePath=fs.SystemToVFSPath(name); + Tesses::Framework::Filesystem::VFSPath exePath=Tesses::Framework::Filesystem::LocalFS->SystemToVFSPath(name); exePath.MakeAbsolute(); - TF_InitWithConsole(); + GC gc; gc.Start(); @@ -54,11 +54,16 @@ int main(int argc, char** argv) svr.StartAccepting(); TF_RunEventLoop(); - TDictionary* _dict; + TDictionary* _dict; + TClassObject* _co; if(GetObjectHeap(res,_dict)) { _dict->CallMethod(ls,"Close",{}); } + if(GetObjectHeap(res,_co)) + { + _co->CallMethod(ls,"","Close",{}); + } TF_Quit(); } else { diff --git a/Tesses.CrossLang.Shell/src/webapp-test.tcross b/Tesses.CrossLang.Shell/src/webapp-test.tcross index b65e106..6176ce7 100644 --- a/Tesses.CrossLang.Shell/src/webapp-test.tcross +++ b/Tesses.CrossLang.Shell/src/webapp-test.tcross @@ -35,4 +35,7 @@ func Tesses.CrossLang.Shell.WebAppTest(dd) Net.Http.ListenSimpleWithLoop(res, port); + + res.Close(); + return 0; } \ No newline at end of file diff --git a/Tesses.CrossLang.Shell/src/webapp.tcross b/Tesses.CrossLang.Shell/src/webapp.tcross index bdaf852..b2dccbb 100644 --- a/Tesses.CrossLang.Shell/src/webapp.tcross +++ b/Tesses.CrossLang.Shell/src/webapp.tcross @@ -44,6 +44,8 @@ func Tesses.CrossLang.Shell.WebApp(dd) Net.Http.ListenSimpleWithLoop(res, port); + res.Close(); + return 0; } else { Console.WriteLine($"Could not find web application with name {toolname}.");