Removed some warning realted to WebStencils integrations
Some checks are pending
TOC Generator / TOC Generator (push) Waiting to run

This commit is contained in:
Daniele Teti 2024-11-09 11:18:30 +01:00
parent 96088127ec
commit e1f9c8ccec
2 changed files with 9 additions and 3 deletions

View File

@ -35,7 +35,7 @@ interface
uses
MVCFramework, System.Generics.Collections, System.SysUtils,
MVCFramework.Commons, System.IOUtils, System.Classes, Web.Stencils,
System.Rtti, MVCFramework.Nullables, System.DateUtils;
System.Rtti, MVCFramework.Nullables, System.DateUtils, System.TypInfo;
type
TMVCWebStencilsEvent = reference to procedure(const WebStencilsProcessor: TWebStencilsProcessor);

View File

@ -900,6 +900,7 @@ type
function GetSession: TMVCWebSession;
function GetViewData(const aModelName: string): TValue;
procedure SetViewData(const aModelName: string; const Value: TValue);
procedure InternalToFree(aObject: TObject);
protected const
CLIENTID_KEY = '__clientid';
protected
@ -4208,7 +4209,7 @@ begin
Result := GetSHA1HashFromString(Data);
end;
procedure TMVCController.ToFree(aObject: TObject);
procedure TMVCController.InternalToFree(aObject: TObject);
begin
if not Assigned(fFreeList) then
begin
@ -4217,9 +4218,14 @@ begin
fFreeList.Add(aObject);
end;
procedure TMVCController.ToFree(aObject: TObject);
begin
InternalToFree(aObject);
end;
function TMVCController.ToFree<T>(aObject: T): T;
begin
ToFree(aObject);
InternalToFree(aObject);
Result := aObject;
end;