Changeset 19


Ignore:
Timestamp:
Nov 15, 2012, 6:08:11 PM (12 years ago)
Author:
chronos
Message:
  • Opraveno: Úniky paměti.
Location:
trunk
Files:
2 added
2 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        55lib
        66Dochazka
         7ChronIS
  • trunk/Application/URegistredModules.pas

    r12 r19  
    1515
    1616uses
    17   UCore, UModuleAttendance;
     17  UModuleAttendance;
    1818
    1919procedure RegisterModules(ModuleManager: TModuleManager);
    2020begin
    2121  UnregisterModules(ModuleManager);
    22   with Core.ModuleManager do
     22  with ModuleManager do
    2323  try
    24     ModuleManager.Modules.BeginUpdate;
     24    Modules.BeginUpdate;
    2525    RegisterModule(TModuleAttendance.Create(nil));
    2626  finally
    27     ModuleManager.Modules.EndUpdate;
     27    Modules.EndUpdate;
    2828  end;
    2929end;
     
    3232var
    3333  I: Integer;
     34  Module: TModule;
    3435begin
     36  with ModuleManager do
    3537  try
    36     ModuleManager.Modules.BeginUpdate;
    37     ModuleManager.Modules.Clear;
     38    Modules.BeginUpdate;
     39    for I := Modules.Count - 1 downto 0 do begin
     40      Module := TModule(Modules[I]);
     41      UnregisterModule(Module);
     42      Module.Free;
     43    end;
    3844  finally
    39     ModuleManager.Modules.EndUpdate;
     45    Modules.EndUpdate;
    4046  end;
    4147end;
  • trunk/Dochazka.lpi

    r16 r19  
    2424          <Version Value="11"/>
    2525          <Target>
    26             <Filename Value="Dochazka"/>
     26            <Filename Value="ChronIS"/>
    2727          </Target>
    2828          <SearchPaths>
    2929            <IncludeFiles Value="$(ProjOutDir)"/>
     30            <OtherUnitFiles Value="Forms;Common;Application;Modules/Attendance"/>
    3031            <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
    3132          </SearchPaths>
     
    201202    <Version Value="11"/>
    202203    <Target>
    203       <Filename Value="Dochazka"/>
     204      <Filename Value="ChronIS"/>
    204205    </Target>
    205206    <SearchPaths>
  • trunk/Modules/Attendance/UModuleAttendance.pas

    r18 r19  
    343343
    344344procedure TModuleAttendance.DoStop;
    345 var
    346   I: Integer;
    347 begin
     345begin
     346  FreeAndNil(ModelUser);
    348347  FormMain.UnregisterDataViewList(ViewListUser);
     348  FreeAndNil(ViewListUser);
    349349  FormMain.UnregisterDataViewForm(ViewFormUser);
     350  FreeAndNil(ViewFormUser);
    350351  FormMain.UnregisterDataViewList(ViewListAttendance);
     352  FreeAndNil(ViewListAttendance);
    351353  FormMain.UnregisterDataViewForm(ViewFormAttendance);
     354  FreeAndNil(ViewFormAttendance);
    352355  FormMain.UnregisterDataViewList(ViewListHoliday);
     356  FreeAndNil(ViewListHoliday);
    353357  FormMain.UnregisterDataViewForm(ViewFormHoliday);
     358  FreeAndNil(ViewFormHoliday);
    354359  FormMain.UnregisterDataViewList(ViewListLog);
     360  FreeAndNil(ViewListLog);
    355361  FormMain.UnregisterDataViewForm(ViewFormLog);
     362  FreeAndNil(ViewFormLog);
    356363  FormMain.UnregisterDataViewList(ViewListOperation);
     364  FreeAndNil(ViewListOperation);
    357365  FormMain.UnregisterDataViewForm(ViewFormOperation);
     366  FreeAndNil(ViewFormOperation);
    358367  FormMain.UnregisterDataViewList(ViewListPassage);
     368  FreeAndNil(ViewListPassage);
    359369  FormMain.UnregisterDataViewForm(ViewFormPassage);
     370  FreeAndNil(ViewFormPassage);
    360371  FormMain.UnregisterDataViewList(ViewListTerminal);
     372  FreeAndNil(ViewListTerminal);
    361373  FormMain.UnregisterDataViewForm(ViewFormTerminal);
     374  FreeAndNil(ViewFormTerminal);
    362375  FreeAndNil(DataModuleAttendance);
    363376  inherited DoStop;
  • trunk/Packages/ModularSystem/Language/UFormModuleList.cs.po

    r14 r19  
    1212
    1313#: uformmodulelist.sadditionalmodulesinstall
    14 msgid ""
    15 "In addition to \"%0:s\" module also dependent modules will be installed: "
    16 "\"%1:s\""
     14msgid "In addition to \"%0:s\" module also dependent modules will be installed: \"%1:s\""
    1715msgstr "K modulu \"%s0:s\" budou instalovány také závislé moduly: \"%1:s\""
    1816
    1917#: uformmodulelist.sadditionalmodulesstart
    20 msgid ""
    21 "In addition to \"%0:s\" module also dependent modules will be started: \"%1:s"
    22 "\""
     18msgid "In addition to \"%0:s\" module also dependent modules will be started: \"%1:s\""
    2319msgstr "K modulu \"%s0:s\" budou spuštěny také závislé moduly: \"%1:s\""
    2420
    2521#: uformmodulelist.sadditionalmodulesstop
    26 msgid ""
    27 "In addition to \"%0:s\" module also dependent modules will be stopped: \"%1:s"
    28 "\""
     22msgid "In addition to \"%0:s\" module also dependent modules will be stopped: \"%1:s\""
    2923msgstr "K modulu \"%s0:s\" budou zastaveny také závislé moduly: \"%1:s\""
    3024
    3125#: uformmodulelist.sadditionalmodulesuninstall
    32 msgid ""
    33 "In addition to \"%0:s\" module alse dependent modules will be uninstalled: "
    34 "\"%1:s\""
     26msgid "In addition to \"%0:s\" module alse dependent modules will be uninstalled: \"%1:s\""
    3527msgstr "K modulu \"%s0:s\" budou odinstalovány také závislé moduly: \"%1:s\""
    3628
     
    114106msgid "Yes"
    115107msgstr "Yes"
     108
  • trunk/Packages/ModularSystem/Language/UModularSystem.cs.po

    r12 r19  
    1313msgid "Module \"%1:s\" not found as dependency for module \"%0:s\""
    1414msgstr "Pro modul \"%0:s\" nenalezen závislÜ modul \"%1:s\""
     15
  • trunk/UCore.pas

    r14 r19  
    105105  if Assigned(FormModuleList) then FreeAndNil(FormModuleList);
    106106  ModuleManager.OnUpdate := nil;
    107   ModuleManager.Modules.Clear;
     107  UnregisterModules(ModuleManager);
    108108end;
    109109
Note: See TracChangeset for help on using the changeset viewer.