How NON IDE-managed components need to be destroyed when OS shuts down?

Hi,
I'm using a VCL component inside a class that does
not contain form. Thus I can't drop my TNMHTTP
component visually.

Instead I create it this way
  TNMHTTP *NMHTTP1;
  NMHTTP1 = new TNMHTTP(0);

and in the destructor :
  delete NMHTTP1;

But when Windows is asked to shut down it refuses
if NMHTTP1 is not deleted.
Furthermore, if I delete it in the Close event of the
main form it won't work, it works only in the CloseQuery
event !

I think I need some help about the NON IDE-managed components.

Thank you

Below a sample of a test program.
The delete instruction in the Close event
is never called when Windows shuts down.

#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
TNMHTTP *NMHTTP1;

__fastcall TForm1::TForm1(TComponent* Owner)
 : TForm(Owner)
{
 NMHTTP1 = new TNMHTTP(0);

Quote
}

void __fastcall TForm1::FormClose(TObject *Sender, TCloseAction &Action)
{
 delete NMHTTP1; NMHTTP1=NULL;

Quote
}

void __fastcall TForm1::FormDblClick(TObject *Sender)
{
 delete NMHTTP1; NMHTTP1=NULL;

Quote
}

void __fastcall TForm1::FormCloseQuery(TObject *Sender, bool &CanClose)
{
// delete NMHTTP1; NMHTTP1=NULL;
Quote
}