diff --git a/ide/lazarus.pp b/ide/lazarus.pp index ed834c7f90..09108a518c 100644 --- a/ide/lazarus.pp +++ b/ide/lazarus.pp @@ -53,16 +53,15 @@ begin Application.Run; SplashForm.Free; -writeln('LAZARUS close application...'); - // workaround till lcl closes clean - Application.Free; - Application:=nil; writeln('LAZARUS END'); end. { $Log$ + Revision 1.19 2001/06/04 07:50:42 lazarus + MG: close application object in gtkint.pp + Revision 1.18 2001/03/19 14:00:46 lazarus MG: fixed many unreleased DC and GDIObj bugs diff --git a/lcl/interfaces/gtk/gtkint.pp b/lcl/interfaces/gtk/gtkint.pp index f9d71767e4..0080590bb5 100644 --- a/lcl/interfaces/gtk/gtkint.pp +++ b/lcl/interfaces/gtk/gtkint.pp @@ -236,8 +236,6 @@ var initialization - - gtk_handler_quark := g_quark_from_static_string('gtk-signal-handlers'); Target_Table[0].Target := 'STRING'; @@ -258,6 +256,9 @@ end. { ============================================================================= $Log$ + Revision 1.14 2001/06/04 07:50:42 lazarus + MG: close application object in gtkint.pp + Revision 1.13 2001/04/06 22:25:14 lazarus * TTimer uses winapi-interface now instead of sendmessage-interface, stoppok diff --git a/lcl/interfaces/gtk/interfaces.pp b/lcl/interfaces/gtk/interfaces.pp index 8a313fefc7..1029e2d58d 100644 --- a/lcl/interfaces/gtk/interfaces.pp +++ b/lcl/interfaces/gtk/interfaces.pp @@ -21,7 +21,7 @@ unit interfaces; -{$mode objfpc} +{$mode objfpc}{$H+} interface @@ -34,14 +34,23 @@ var implementation uses - GTKInt; + GTKInt, + Forms; // MG: GTKInt uses forms, so the application object is destroyed + // in the forms finalization section AFTER this finalization + // section. But the lcl objects need the gtk to close clean. + // Therefore the application object is freed here. + // P.S.: This is only a workaround till the interfaces are below + // the lcl. initialization - InterfaceObject := TgtkObject.Create; + InterfaceObject := TgtkObject.Create; finalization - InterfaceObject.Free; + Application.Free; + Application:=nil; + + InterfaceObject.Free; end.