TCanvas leak

General TRichView support forum. Please post your questions here
Post Reply
goobit
Posts: 1
Joined: Fri Apr 12, 2013 10:16 am

TCanvas leak

Post by goobit »

I have 13.10.1 version. This canvas TRVFontInfoCacheFast.FInvalidItem.Canvas is not destroyed when TRVFontInfoCacheFast destroys. I fix it such way:

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;
Is this leak fixed in the latest version?
Sergey Tkachenko
Site Admin
Posts: 17564
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

No, this leak was not fixed. Thank you for reporting.
Sergey Tkachenko
Site Admin
Posts: 17564
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Fixed in v14.4 (available for registered users)
Post Reply