C++ new and delete statements

Associate
Joined
22 Jul 2004
Posts
230
Location
Nottingham, UK
Look at the code below.

Code:
string A, B;

CT2CA* aTemp = new CT2CA( frmAdd->A );
A = string( *aTemp );

aTemp = new CT2CA( frmAdd->B );
A = string( *aTemp );

delete aTemp;

My question is; when i call the 2nd new statement does the previous class get deleted, or do i have todo that manually?
 
Back
Top Bottom