Page 1 of 1

TRVSpellChecker.Suggest Leaks

Posted: Sun Jul 07, 2024 9:28 pm
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

Re: TRVSpellChecker.Suggest Leaks

Posted: Sun Jul 07, 2024 10:31 pm
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