Subject | DeleteObject( FComboBitmapHdl ) in TIB_CustomCombo.Destroy is necessary? |
---|---|
Author | Dieter Tremel |
Post date | 2002-02-20T14:43:02Z |
Hallo Jason,
after a session with memproof I suppose that the DeleteObject(
FComboBitmapHdl ); in the code below is unnecessary, because ist is
done automatically. Can you or any other who is more familiar with Win
API than I proof this please?
destructor TIB_CustomCombo.Destroy;
begin
FButton.Glyph.Handle := 0;
// Tremel 20.2.2002 DeleteObject( FComboBitmapHdl );
// I Think it is done automatically
FComboBitmapHdl := 0;
{$IFNDEF VER90}
FAutoLabel.Free;
FAutoLabel := nil;
{$ENDIF}
DataSource := nil;
with DataLink do
begin
Control := nil;
OnStateChanged := nil;
OnEditingChanged := nil;
OnDataChange := nil;
end;
CustomPopup := nil;
if FCanvas <> nil then
begin
FCanvas.Free;
FCanvas := nil;
end;
inherited Destroy;
end;
Dieter Tremel
after a session with memproof I suppose that the DeleteObject(
FComboBitmapHdl ); in the code below is unnecessary, because ist is
done automatically. Can you or any other who is more familiar with Win
API than I proof this please?
destructor TIB_CustomCombo.Destroy;
begin
FButton.Glyph.Handle := 0;
// Tremel 20.2.2002 DeleteObject( FComboBitmapHdl );
// I Think it is done automatically
FComboBitmapHdl := 0;
{$IFNDEF VER90}
FAutoLabel.Free;
FAutoLabel := nil;
{$ENDIF}
DataSource := nil;
with DataLink do
begin
Control := nil;
OnStateChanged := nil;
OnEditingChanged := nil;
OnDataChange := nil;
end;
CustomPopup := nil;
if FCanvas <> nil then
begin
FCanvas.Free;
FCanvas := nil;
end;
inherited Destroy;
end;
Dieter Tremel