diff --git a/packages/rtl/rtti.pas b/packages/rtl/rtti.pas index 6c318df..232dbe4 100644 --- a/packages/rtl/rtti.pas +++ b/packages/rtl/rtti.pas @@ -97,6 +97,9 @@ type function GetType(aTypeInfo: PTypeInfo): TRTTIType; overload; function GetType(aClass: TClass): TRTTIType; overload; function GetTypes: specialize TArray; + + class procedure KeepContext; static; + class procedure DropContext; static; end; { TRttiObject } @@ -1589,6 +1592,16 @@ begin Result := specialize TArray(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);