Open Mikkao opened 5 years ago
In dexifwrite line 298 the first item of ASubIFDList is deleted. TList.Delete does not free the memory. Since ASubIFDList is not a TList, but a TInt64List (dUtils, line 24), the procedure Notify must be overridden to prevent the memory leak:
procedure Notify(Ptr: Pointer; Action: TListNotification); override;
procedure TInt64List.Notify(Ptr: Pointer; Action: TListNotification); begin inherited; If Action = lnDeleted then Dispose(Ptr); end;
In dexifwrite line 298 the first item of ASubIFDList is deleted. TList.Delete does not free the memory. Since ASubIFDList is not a TList, but a TInt64List (dUtils, line 24), the procedure Notify must be overridden to prevent the memory leak:
procedure Notify(Ptr: Pointer; Action: TListNotification); override;
procedure TInt64List.Notify(Ptr: Pointer; Action: TListNotification); begin inherited; If Action = lnDeleted then Dispose(Ptr); end;