I call it as such:Bad idea, use ListBox1.Items.Assign instead, assign the function result to a local variable first then free it after calling .Assign:...
listbox1.items := gamedata.getcategories
First, is it the Tstringlist assigned to Result that is the issue? and if so, how would I go about freeing it?
heaptrc is complaining about getcategories at the line:Need to know what TWord.Category is first. If it's also a function, including property mapped one, then it's the same thing as above.
result.Add(Tword(words[i]).Category);
A better way is to pass listbox1.items to gamedata.fillcategories.+1