fix bugs id=3104387,3104383 - mem leak in TRxLookupEdit and TRxTimeEdit

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1429 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
alexs75
2011-01-07 21:54:02 +00:00
parent 973e0ee879
commit 21900be3c0
2 changed files with 8 additions and 3 deletions

View File

@ -598,6 +598,8 @@ begin
end;
constructor TRxCustomDBLookupEdit.Create(AOwner: TComponent);
var
P:TBitmap;
begin
inherited Create(AOwner);
FLocateObject:=CreateLocate(nil);
@ -611,7 +613,9 @@ begin
// FDropDownCount:=8;
FFieldList:=TStringList.Create;
Glyph:=CreateArrowBitmap;
P:=CreateArrowBitmap;
Glyph.Assign(P);
P.Free;
ButtonWidth:=15;
FPopUpFormOptions:=TPopUpFormOptions.Create;
end;
@ -622,6 +626,7 @@ begin
FreeAndNil(FPopUpFormOptions);
FFieldList.Clear;
FreeAndNil(FFieldList);
FreeAndNil(FLookupDataLink);
inherited Destroy;
end;

View File

@ -261,8 +261,8 @@ const
constructor TRxSpinButton.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
FUpBitmap := TBitmap.Create;
FDownBitmap := TBitmap.Create;
{ FUpBitmap := TBitmap.Create;
FDownBitmap := TBitmap.Create;}
FUpBitmap := LoadBitmapFromLazarusResource(sSpinUpBtn);
FDownBitmap := LoadBitmapFromLazarusResource(sSpinDownBtn);
FUpBitmap.OnChange := @GlyphChanged;