Proper Destruction of TSQLServer

I’ve got a memory leak and so I figure now is a good time to make sure I’m closing and deleting things properly. I use the TSQL Classes in order to access a MS SQL Server database and would like to make sure I’m deleting the pointers correctly. I have many queries and therefore have about 6 servers and statements at the same time. Here’s how I do my code…

TSQLServer *srv1, *srv2, *srv3, *srv4, *srv5, *srv6;
TSQLStatement *st1, *st2, *st3, *st4, *st5, *st6;

TString srvInfo(“odbcd://DRIVER={SQL Server};SERVER=;DATABASE=db;UID=user;PWD=pass;”

srv1 = TSQLServer::Connect(srvInfo.Data(),0,0);
srv2 = TSQLServer::Connect(srvInfo.Data(),0,0);
srv3 = TSQLServer::Connect(srvInfo.Data(),0,0);
srv4 = TSQLServer::Connect(srvInfo.Data(),0,0);
srv5 = TSQLServer::Connect(srvInfo.Data(),0,0);
srv6 = TSQLServer::Connect(srvInfo.Data(),0,0);

st1 = srv1->Statement(“Select * from Table1”);
st2 = srv2->Statement(“Select * from Table2”);
st3 = srv3->Statement(“Select * from Table3”);
st4 = srv4->Statement(“Select * from Table4”);
st5 = srv5->Statement(“Select * from Table5”);
st6 = srv6->Statement(“Select * from Table6”);


delete st1; srv1->Close(); delete srv1;
delete st2; srv2->Close(); delete srv2;
delete st3; srv3->Close(); delete srv3;
delete st4; srv4->Close(); delete srv4;
delete st5; srv5->Close(); delete srv5;
delete st6; srv6->Close(); delete srv6;

Is this the correct way to handle the class? Any suggestions would be appreciated. I understand it is always better to send working code samples but since my database isn’t freely accessable I don’t know how to make a code that would work for others.

John Estrada