Changeset 38 for trunk/UCore.pas


Ignore:
Timestamp:
Mar 8, 2012, 3:40:45 PM (13 years ago)
Author:
chronos
Message:
  • Fixed: SqlDatabase object initialized twice and freed once.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UCore.pas

    r37 r38  
    1616    CoolTranslator1: TCoolTranslator;
    1717    DebugLog1: TDebugLog;
    18     SqlDatabase1: TSqlDatabase;
    1918    procedure DataModuleCreate(Sender: TObject);
    2019    procedure DataModuleDestroy(Sender: TObject);
     
    5655  System := TChronisBase.Create;
    5756  System.Client := TChronisClientMySQL.Create;
    58   TChronisClientMySQL(System.Client).Database := SqlDatabase1;
     57  //TChronisClientMySQL(System.Client).Database := SqlDatabase1;
    5958  System.RegisterModule(TModuleSystem);
    6059  System.ModuleSystem := TModuleSystem(System.Modules.Last);
     
    6867begin
    6968  SaveToRegistry;
    70   System.Free;
    71   Profiles.Free;
     69  FreeAndNil(System);
     70  FreeAndNil(Profiles);
    7271end;
    7372
Note: See TracChangeset for help on using the changeset viewer.