mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-27 04:53:39 +02:00
fixed memleaks
git-svn-id: trunk@7701 -
This commit is contained in:
parent
3ced7b3748
commit
bd931cdfa7
@ -15,6 +15,7 @@ object LazDocForm: TLazDocForm
|
||||
object PageControl: TPageControl
|
||||
ActivePage = ErrorsTabSheet
|
||||
Align = alClient
|
||||
BorderSpacing.OnChange = nil
|
||||
TabIndex = 2
|
||||
TabOrder = 0
|
||||
TabPosition = tpBottom
|
||||
@ -28,7 +29,6 @@ object LazDocForm: TLazDocForm
|
||||
Width = 745
|
||||
object ShortEdit: TEdit
|
||||
Align = alTop
|
||||
BorderSpacing.OnChange = nil
|
||||
OnChange = DescrMemoChange
|
||||
TabOrder = 0
|
||||
Text = 'ShortEdit'
|
||||
@ -44,6 +44,7 @@ object LazDocForm: TLazDocForm
|
||||
Width = 745
|
||||
object DescrMemo: TMemo
|
||||
Align = alClient
|
||||
BorderSpacing.OnChange = nil
|
||||
Font.CharSet = ANSI_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -12
|
||||
@ -66,7 +67,6 @@ object LazDocForm: TLazDocForm
|
||||
Width = 745
|
||||
object ErrorsMemo: TMemo
|
||||
Align = alClient
|
||||
BorderSpacing.OnChange = nil
|
||||
Font.CharSet = ANSI_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -12
|
||||
|
@ -7,23 +7,23 @@ LazarusResources.Add('TLazDocForm','FORMDATA',[
|
||||
+'xelsPerInch'#2'`'#18'HorzScrollBar.Page'#3#240#2#18'VertScrollBar.Page'#3
|
||||
+#194#0#4'Left'#3#245#0#6'Height'#3#195#0#3'Top'#3#250#1#5'Width'#3#241#2#0#12
|
||||
+'TPageControl'#11'PageControl'#10'ActivePage'#7#14'ErrorsTabSheet'#5'Align'#7
|
||||
+#8'alClient'#8'TabIndex'#2#2#8'TabOrder'#2#0#11'TabPosition'#7#8'tpBottom'#6
|
||||
+'Height'#3#195#0#5'Width'#3#241#2#0#9'TTabSheet'#13'ShortTabSheet'#7'Caption'
|
||||
+#6#13'ShortTabSheet'#12'ClientHeight'#3#169#0#11'ClientWidth'#3#233#2#6'Heig'
|
||||
+'ht'#3#169#0#5'Width'#3#233#2#0#5'TEdit'#9'ShortEdit'#5'Align'#7#5'alTop'#22
|
||||
+'BorderSpacing.OnChange'#13#8'OnChange'#7#15'DescrMemoChange'#8'TabOrder'#2#0
|
||||
+#4'Text'#6#9'ShortEdit'#6'Height'#2#23#5'Width'#3#233#2#0#0#0#9'TTabSheet'#13
|
||||
+#8'alClient'#22'BorderSpacing.OnChange'#13#8'TabIndex'#2#2#8'TabOrder'#2#0#11
|
||||
+'TabPosition'#7#8'tpBottom'#6'Height'#3#195#0#5'Width'#3#241#2#0#9'TTabSheet'
|
||||
+#13'ShortTabSheet'#7'Caption'#6#13'ShortTabSheet'#12'ClientHeight'#3#169#0#11
|
||||
+'ClientWidth'#3#233#2#6'Height'#3#169#0#5'Width'#3#233#2#0#5'TEdit'#9'ShortE'
|
||||
+'dit'#5'Align'#7#5'alTop'#8'OnChange'#7#15'DescrMemoChange'#8'TabOrder'#2#0#4
|
||||
+'Text'#6#9'ShortEdit'#6'Height'#2#23#5'Width'#3#233#2#0#0#0#9'TTabSheet'#13
|
||||
+'DescrTabSheet'#7'Caption'#6#13'DescrTabSheet'#12'ClientHeight'#3#169#0#11'C'
|
||||
+'lientWidth'#3#233#2#6'Height'#3#169#0#5'Width'#3#233#2#0#5'TMemo'#9'DescrMe'
|
||||
+'mo'#5'Align'#7#8'alClient'#12'Font.CharSet'#7#12'ANSI_CHARSET'#10'Font.Colo'
|
||||
+'r'#7#7'clBlack'#11'Font.Height'#2#244#9'Font.Name'#6#11'Courier New'#10'Fon'
|
||||
+'t.Pitch'#7#7'fpFixed'#13'Lines.Strings'#1#6#9'DescrMemo'#0#8'OnChange'#7#15
|
||||
+'DescrMemoChange'#8'TabOrder'#2#0#6'Height'#3#169#0#5'Width'#3#233#2#0#0#0#9
|
||||
+'TTabSheet'#14'ErrorsTabSheet'#7'Caption'#6#14'ErrorsTabSheet'#12'ClientHeig'
|
||||
+'ht'#3#169#0#11'ClientWidth'#3#233#2#6'Height'#3#169#0#5'Width'#3#233#2#0#5
|
||||
+'TMemo'#10'ErrorsMemo'#5'Align'#7#8'alClient'#22'BorderSpacing.OnChange'#13
|
||||
+#12'Font.CharSet'#7#12'ANSI_CHARSET'#10'Font.Color'#7#7'clBlack'#11'Font.Hei'
|
||||
+'ght'#2#244#9'Font.Name'#6#11'Courier New'#10'Font.Pitch'#7#7'fpFixed'#13'Li'
|
||||
+'nes.Strings'#1#6#10'ErrorsMemo'#0#8'OnChange'#7#15'DescrMemoChange'#8'TabOr'
|
||||
+'der'#2#0#6'Height'#3#169#0#5'Width'#3#233#2#0#0#0#0#0
|
||||
+'mo'#5'Align'#7#8'alClient'#22'BorderSpacing.OnChange'#13#12'Font.CharSet'#7
|
||||
+#12'ANSI_CHARSET'#10'Font.Color'#7#7'clBlack'#11'Font.Height'#2#244#9'Font.N'
|
||||
+'ame'#6#11'Courier New'#10'Font.Pitch'#7#7'fpFixed'#13'Lines.Strings'#1#6#9
|
||||
+'DescrMemo'#0#8'OnChange'#7#15'DescrMemoChange'#8'TabOrder'#2#0#6'Height'#3
|
||||
+#169#0#5'Width'#3#233#2#0#0#0#9'TTabSheet'#14'ErrorsTabSheet'#7'Caption'#6#14
|
||||
+'ErrorsTabSheet'#12'ClientHeight'#3#169#0#11'ClientWidth'#3#233#2#6'Height'#3
|
||||
+#169#0#5'Width'#3#233#2#0#5'TMemo'#10'ErrorsMemo'#5'Align'#7#8'alClient'#12
|
||||
+'Font.CharSet'#7#12'ANSI_CHARSET'#10'Font.Color'#7#7'clBlack'#11'Font.Height'
|
||||
+#2#244#9'Font.Name'#6#11'Courier New'#10'Font.Pitch'#7#7'fpFixed'#13'Lines.S'
|
||||
+'trings'#1#6#10'ErrorsMemo'#0#8'OnChange'#7#15'DescrMemoChange'#8'TabOrder'#2
|
||||
+#0#6'Height'#3#169#0#5'Width'#3#233#2#0#0#0#0#0
|
||||
]);
|
||||
|
@ -95,7 +95,7 @@ const
|
||||
|
||||
var
|
||||
LazDocForm: TLazDocForm;
|
||||
doc: TXMLdocument;
|
||||
doc: TXMLdocument = nil; // maybe better to make it a member field of TLazFormDoc
|
||||
|
||||
procedure DoShowLazDoc;
|
||||
|
||||
@ -106,7 +106,7 @@ implementation
|
||||
procedure DoShowLazDoc;
|
||||
begin
|
||||
if LazDocForm = Nil then
|
||||
LazDocForm := TLazDocForm.Create(Nil);
|
||||
Application.CreateForm(TLazDocForm, LazDocForm);
|
||||
|
||||
LazDocForm.Show;
|
||||
end;
|
||||
@ -118,8 +118,8 @@ begin
|
||||
|
||||
FDocFileName := Value;
|
||||
|
||||
if not Assigned(doc) then
|
||||
doc := TXMLDocument.Create;
|
||||
if Assigned(doc) then
|
||||
FreeAndNil(doc);
|
||||
|
||||
ReadXMLFile(doc, FDocFileName);
|
||||
|
||||
@ -451,6 +451,9 @@ end;
|
||||
|
||||
initialization
|
||||
{$I lazdocfrm.lrs}
|
||||
|
||||
finalization
|
||||
FreeAndNil(doc)
|
||||
|
||||
end.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user