//-------------------------------------------------------------------
// ECLConnection::~ECLConnection (Destructor)
//
// Create two connection objects, then delete both of them.
//-------------------------------------------------------------------
void Sample8() {
ECLConnection *pConn1, *pConn2;
long Hand;
try {
pConn1 = new ECLConnection('A');
Hand = pConn1->GetHandle();
pConn2 = new ECLConnection(Hand); // Another ECLConnection for 'A'
printf("Conn1 is for connection %c, Conn2 is for connection %c.\n",
pConn1->GetName(), pConn2->GetName());
delete pConn1; // Call destructors
delete pConn2;
}
catch (ECLErr Err) {
printf("ECL Error: %s\n", Err.GetMsgText());
}
} // end sample