/*
StrNew, StrDispose example
This example uses an edit control and a button on a form. When the button is clicked, memory is allocated for a copy of the text in the edit control, the text is displayed in a message box, and then the memory is deallocated.
*/ 
void __fastcall TForm1::Button1Click(TObject *Sender)
{
  // Allocate memory.
  char* psz = StrNew(Edit1->Text.c_str());
  Application->MessageBox(psz, "StrNew, StrDispose example", MB_OK);
  // Deallocate memory.
  StrDispose(psz);
} 
