mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-04-08 19:47:57 +02:00
Keep and drop context in the TRTTIContext.
This commit is contained in:
parent
05e0c745d5
commit
5612d3812f
@ -97,6 +97,9 @@ type
|
||||
function GetType(aTypeInfo: PTypeInfo): TRTTIType; overload;
|
||||
function GetType(aClass: TClass): TRTTIType; overload;
|
||||
function GetTypes: specialize TArray<TRttiType>;
|
||||
|
||||
class procedure KeepContext; static;
|
||||
class procedure DropContext; static;
|
||||
end;
|
||||
|
||||
{ TRttiObject }
|
||||
@ -1589,6 +1592,16 @@ begin
|
||||
Result := specialize TArray<TRttiType>(TJSObject.Values(Pool.FTypes));
|
||||
end;
|
||||
|
||||
class procedure TRTTIContext.KeepContext;
|
||||
begin
|
||||
Pool.AcquireContext;
|
||||
end;
|
||||
|
||||
class procedure TRTTIContext.DropContext;
|
||||
begin
|
||||
Pool.ReleaseContext;
|
||||
end;
|
||||
|
||||
{ TRttiObject }
|
||||
|
||||
constructor TRttiObject.Create(AParent: TRttiObject; AHandle: Pointer);
|
||||
|
Loading…
Reference in New Issue
Block a user