We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not include unit WinAPI.Windows in MVCFramework.ObjectPool, ZeroMemory function can use FillChar instead
procedure TCleanupThread<T>.Execute; var lTargetSize: Integer; lAvgSize: TPoolSizeSamples; lArrIndex: Integer; lSampleTick: Integer; begin lArrIndex := 0; lSampleTick := 0; while not Terminated do begin Inc(lSampleTick); lArrIndex := lSampleTick mod AVG_SAMPLES_COUNT; lAvgSize[lArrIndex] := fObjectPool.Size; if (lAvgSize[lArrIndex] > 0) and (GetAveragePoolSize(lAvgSize) >= fObjectPool.fShrinkTriggerSize) then begin fObjectPool.Lock; try fObjectPool.ShrinkPoolTo(fObjectPool.fShrinkTargetSize); FillChar(lAvgSize, SizeOf(lAvgSize),0); // ZeroMemory(@lAvgSize, SizeOf(lAvgSize)); finally fObjectPool.UnLock; end; end else begin Sleep(GObjectPoolSamplingIntervalMS); if lSampleTick = MaxInt then begin lSampleTick := 0; end; end; end; end;
The text was updated successfully, but these errors were encountered:
https://github.com/danieleteti/delphimvcframework/issues/682
f21bb11
danieleteti
No branches or pull requests
Do not include unit WinAPI.Windows in MVCFramework.ObjectPool, ZeroMemory function can use FillChar instead
The text was updated successfully, but these errors were encountered: