Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.
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;
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
16 Experts available now in Live!