02-15-2021, 01:10 PM
I have UIWServerControllerBaseConfig define two forms:
IWExceptionRenderer.SetExceptionRendererClass(TIWExceptionRendererEx);
if FLock<>nil then FreeAndNil(FLock);
FLock:= TCriticalSection.Create;
THandlers.Add('', 'Form1', TContentForm.Create(TForm1)); http://localhost/form1 (first load)
THandlers.Add('', 'Form2', TContentForm.Create(TForm2)); http://localhost/form2
In UserSesssion i have define procedures LoadDatas/ClearDatas with my TDatas. Both Forms used this procedures.
If switch Form2 then i want ClearDatas in Form1? If i dont, i get memory leaks from Form1, if destroy Usersession! Who Release!
IWExceptionRenderer.SetExceptionRendererClass(TIWExceptionRendererEx);
if FLock<>nil then FreeAndNil(FLock);
FLock:= TCriticalSection.Create;
THandlers.Add('', 'Form1', TContentForm.Create(TForm1)); http://localhost/form1 (first load)
THandlers.Add('', 'Form2', TContentForm.Create(TForm2)); http://localhost/form2
In UserSesssion i have define procedures LoadDatas/ClearDatas with my TDatas. Both Forms used this procedures.
If switch Form2 then i want ClearDatas in Form1? If i dont, i get memory leaks from Form1, if destroy Usersession! Who Release!