Closing Maximized MDIChild form crash

This took me long time to figure out.  In my MDIChild form, I use a bitmap
to buffer the drawing in order to reduce flicker.  So I had something like
these:
__fastcall TFormEditor::TFormEditor(TComponent* Owner)
    : TForm(Owner)
{
    ...
    PBitmap = new Graphics::TBitmap();
    ...
Quote
}

__fastcall TFormEditor::~TFormEditor()
{
    delete PBitmap;
Quote
}

void __fastcall TFormEditor::FormResize(TObject *Sender)
{
    PBitmap->Width = ClientWidth;
    PBitmap->Height = ClientHeight;

Quote
}

Everything work fine.  Except that when a user maximize the MDIChild form
and then closing it, the program crash.  The IDE de{*word*81} cannot catch where
the program crash.  It took me long time to add and delete codes just to
know where it crash.  The problem is this.  When the maximized MDIChild form
is closing.  The destructor will be called and free the PBitmap.  However,
after that the FormResize event is called???  So it will try to resize the
freed PBitmap and this crash the problem.  On simple test MDI application
this do not crash the problem.  To fix this, I add the following codes to
test whether PBitmap is deleted or not:
__fastcall TFormEditor::~TFormEditor()
{
    delete PBitmap;
    PBitmap = NULL;
Quote
}

void __fastcall TFormEditor::FormResize(TObject *Sender)
{
    if (WindowState == wsNormal || (WindowState == wsMaximized && PBitmap !=
NULL)) {
        PBitmap->Width = ClientWidth;
        PBitmap->Height = ClientHeight;
    }

Quote
}

Is this a TForm bug or window bug?  Any idea?
david_s_...@hotmail.com