TRVSpellChecker.Suggest Leaks

General TRichView support forum. Please post your questions here
Post Reply
standay
Posts: 274
Joined: Fri Jun 18, 2021 3:07 pm

TRVSpellChecker.Suggest Leaks

Post by standay »

Hi Sergey,

I'm trying to get the list of suggested words from the TRVSpellChecker.Suggest list. When I do this:

Code: Select all

ListBox2.Items.Text := Form1.RVSpellChecker1.Suggest(Items[i]).Text;
It works and gives me the list of suggestions, but when I close the app I get a lot of leaks. I'll attach the leak report.

I'm probably using this wrong so if you can tell me how to do this correctly I'd appreciate it.

Thanks

Stan
Attachments
SRDJournal.exe - 2024-07-07 - 15.24.33 - leak report.txt
(19.78 KiB) Downloaded 585 times
standay
Posts: 274
Joined: Fri Jun 18, 2021 3:07 pm

Re: TRVSpellChecker.Suggest Leaks

Post by standay »

Hi Sergey,

I think I have it now. I'm doing this:

Code: Select all

var
  templist: TStringList;  
  ...
  //NO TStringList.Create  
  templist := Form1.RVSpellChecker1.Suggest(Items[i]);
  ListBox2.Items.Text := templist.Text;
  templist.Free;
and all is well!

Stan
Post Reply