TBitmap::ReleaseHandle(); TBitmap DIB DDB


    I have some problems with understanding DIB bitmaps and DDB.
I have found in BCB6sp2 (under WinXPsp1) help file an example program, that
is not clear to me (about Bitmap2->ReleaseHandle(); )

there is code in help file:

void __fastcall TForm1::Button1Click(TObject *Sender)
  Graphics::TBitmap *Bitmap1 = new Graphics::TBitmap();
  Graphics::TBitmap *Bitmap2 = new Graphics::TBitmap();
    Bitmap1->LoadFromFile("C:\\Program Files\\Common Files\\Borland
Shared\\Images\\Splash\\256color\\factory.bmp ");
    Bitmap2->Assign(Bitmap1);     // Copy Bitmap1 into Bitmap2
//as i understand here I have DDB bitmaps in B1 and B2, yes?

    Bitmap2->Dormant();              // Free up GDI resources
// here B2 is in DIB format, yes?

    Bitmap2->FreeImage();           // Free up Memory.
//DDB bitmap of B2 is cleared here, yes?

    Canvas->Draw(20,20,Bitmap2);  // Note that previous calls don't lose the
//why there is no bitmap on screen?
//I have to comment out Dormant method in order to see it.

    Bitmap2->Monochrome = true;

//Is this line required?
    Bitmap2->ReleaseHandle();       // This will actually lose the bitmap;
  catch (...)
  delete Bitmap1;
  delete Bitmap2;


I have compiled this and tested under AQtime and Memproof memory de{*word*81}s.
There is an Bitmap resource leaked, if there is: Bitmap2->ReleaseHandle() in
the code.
When I comment this line out It seems to be okay.
The de{*word*81} comment:"CreateBitmap creates a bitmap with the specified
height, and color format. The returned bitmap handle must be freed with
DeleteObject when no longer needed."
Is it really wrong example code here provided by C++Builder?

I see only one image on screen: that monochrome one.
It was okay, when I commented out the dormant() line.
I do not understand it?

As I understand Dormant creates DIB bitmap in memory. (with adequate header)

In which area in this code I can use BitBlt functions?
and should I perform any releasing of handle, if I read
MyBitmap->Canvas->Handle property in each calling bitblt?

5. Is there any reliable article on DIB and DDB when using VCL TBitmap and
windows API?
I'd like to understand it clear, cause in my program there is a lot of my
own control graphic control knobs,
and I'd like to use as little as possible resources under win9x.

Thanks in advance,
Best Regards,
Grzegorz K.