TCanvas leak
Posted: Fri Apr 12, 2013 10:39 am
I have 13.10.1 version. This canvas TRVFontInfoCacheFast.FInvalidItem.Canvas is not destroyed when TRVFontInfoCacheFast destroys. I fix it such way:
Is this leak fixed in the latest version?
Code: Select all
procedure TRVFontInfoCacheFast.Clear;
var
CacheItem: TRVFontInfoCacheItem;
i: Integer;
begin
{ -- Begin Added Lines -- }
if Assigned(FInvalidItem) and Assigned(FInvalidItem.Canvas) then
FRVStyle.GraphicInterface.DestroyCompatibleCanvas(FInvalidItem.Canvas);
{ -- End Added Lines -- }
for i := 0 to Count-1 do
if Get(i) <> nil then begin
CacheItem := Get(i);
FRVStyle.GraphicInterface.DestroyCompatibleCanvas(CacheItem.Canvas);
end;
inherited Clear;
end;