We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
Type TThreadSafeParametersList = class(TThreadList) constructor Create; destructor Destroy; override; procedure FreeAllAndClearList; end; Implementation constructor TThreadSafeParametersList.Create; begin inherited Create; self.Duplicates := dupAccept; end; destructor TThreadSafeParametersList.Destroy; begin FreeAllAndClearList; ////<= from time-to-time AV is caused by pointer to this method no longer is valid (000000) inherited Destroy; end; procedure TThreadSafeParametersList.FreeAllAndClearList; var i: integer; begin with LockList do try for i := 0 to Count-1 do try if Assigned(TObject(Items[i])) then TObject(Items[i]).Free; finally end; Clear; finally UnlockList; end; end;
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.