Funky Beast wrote:
Fixed with attached.
Didn't notice it at first, but TLazSearchMatchPos objects stored in
UpdateStrings and Items property of TLazSearchResultLB share the same
instance. So when UpdateStrings objects are freed, freeing Item's object
will be freeing it twice.
Also when filtering, Items and its objects are backed up to
BackupStrings property and
Items' objects are freed and the list is cleared first.
Since Items' objects are freed, UpdateStrings' objects are freed too, hence
UpdateStrings becomes a stringlist without objects, trying to free its
objects will
cause AV.
The patch clears UpdateStrings after backing up list Items and its
objects as
FreeObjects functions checks for the count property before freeing. And at
destroying checks if UpdateStrings is empty before clearing Items' objects.
Tested, no AV or exception on linux.
No access violations, no memory leaks on windows. Thanks. Applied.
Vincent
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives