Ignore:
Timestamp:
Apr 16, 2020, 7:40:38 PM (5 years ago)
Author:
chronos
Message:
  • Fixed: Memory leaks.
Location:
branches/interpreter2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/interpreter2

    • Property svn:ignore set to
      lib
      interpreter
      interpreter.lps
      interpreter.res
      heaptrclog.trc
  • branches/interpreter2/UFormMain.pas

    r200 r201  
    2323    procedure ButtonRunClick(Sender: TObject);
    2424    procedure FormActivate(Sender: TObject);
     25    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
     26    procedure FormDestroy(Sender: TObject);
    2527    procedure FormShow(Sender: TObject);
    2628  private
     
    5658end;
    5759
     60procedure TFormMain.FormClose(Sender: TObject; var CloseAction: TCloseAction);
     61begin
     62
     63end;
     64
     65procedure TFormMain.FormDestroy(Sender: TObject);
     66begin
     67  if Assigned(Prog) then Prog.Free;
     68end;
     69
    5870procedure TFormMain.FormShow(Sender: TObject);
    5971begin
     
    8597  Parser.Source := MemoSource.Lines.Text;
    8698  Parser.Parse;
     99  if Assigned(Prog) then Prog.Free;
    87100  Prog := Parser.Prog;
    88101  Parser.Free;
Note: See TracChangeset for help on using the changeset viewer.