Changeset 24


Ignore:
Timestamp:
Jan 2, 2019, 10:36:09 AM (5 years ago)
Author:
chronos
Message:
  • Fixed: Memory leaks reported by heaptrc.
Location:
branches/overos
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/overos

    • Property svn:ignore
      •  

        old new  
        33overos.lps
        44overos.res
         5heaptrclog.trc
         6overos.exe
  • branches/overos/UApplication.pas

    r23 r24  
    4242    if Message is TMessageWindow then
    4343      TWindow(Message.Handle).HandleMessage(Message);
     44    Message.Free;
    4445  end;
    4546end;
  • branches/overos/UFormMain.lfm

    r22 r24  
    77  ClientHeight = 523
    88  ClientWidth = 758
    9   DesignTimePPI = 128
     9  DesignTimePPI = 120
     10  OnClose = FormClose
    1011  OnResize = FormResize
    1112  OnShow = FormShow
  • branches/overos/UFormMain.pas

    r23 r24  
    1717    Image1: TImage;
    1818    Timer1: TTimer;
     19    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    1920    procedure Image1MouseDown(Sender: TObject; Button: TControlsMouseButton;
    2021      Shift: TShiftState; X, Y: Integer);
     
    9899end;
    99100
     101procedure TFormMain.FormClose(Sender: TObject; var CloseAction: TCloseAction);
     102begin
     103  Timer1.Enabled := False;
     104  App.Free;
     105  System.Free;
     106end;
     107
    100108procedure TFormMain.Image1MouseMove(Sender: TObject; Shift: TShiftState; X,
    101109  Y: Integer);
  • branches/overos/UWindow.pas

    r23 r24  
    176176  ButtonMaximize.Free;
    177177  ButtonMinimize.Free;
    178   inherited Destroy;
     178  inherited;
    179179end;
    180180
     
    457457  I: Integer;
    458458begin
    459   for I := 0 to Windows.Count - 1 do
     459  for I := Windows.Count - 1 downto 0 do
    460460    Windows[I].Free;
    461461  Windows.Free;
  • branches/overos/overos.lpr

    r22 r24  
    99  Interfaces, // this includes the LCL widgetset
    1010  Forms, UFormMain, UWindow, UMouse, USystem, UTypes, UControls, UGraphics,
    11   UApplication
     11  UApplication, SysUtils
    1212  { you can add units after this };
    1313
    1414{$R *.res}
    1515
     16{$if declared(UseHeapTrace)}
     17const
     18  HeapTraceLog = 'heaptrclog.trc';
     19{$ENDIF}
     20
    1621begin
     22  {$if declared(UseHeapTrace)}
     23  // Heap trace
     24  DeleteFile(ExtractFilePath(ParamStr(0)) + HeapTraceLog);
     25  SetHeapTraceOutput(ExtractFilePath(ParamStr(0)) + HeapTraceLog);
     26  {$ENDIF}
     27
    1728  RequireDerivedFormResource:=True;
    1829  Application.Initialize;
Note: See TracChangeset for help on using the changeset viewer.