From 3f7fb4a548d1a552f51e14a26091ffedfff3b34d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20M=C3=BCller?= Date: Sun, 17 Nov 2024 17:47:43 +0100 Subject: [PATCH] Added global BinomialCoefficients instance --- UBinomialCoefficients.pas | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/UBinomialCoefficients.pas b/UBinomialCoefficients.pas index 96b9ff6..71c4780 100644 --- a/UBinomialCoefficients.pas +++ b/UBinomialCoefficients.pas @@ -44,6 +44,9 @@ type function GetCachedRowsCount: Cardinal; end; +var + BinomialCoefficients: TBinomialCoefficientCache; + implementation { TBinomialCoefficientCache } @@ -92,5 +95,11 @@ begin Result := FCache.Count; end; +initialization + BinomialCoefficients := TBinomialCoefficientCache.Create; + +finalization + BinomialCoefficients.Free; + end.