C
Charles Herman
I have the following loop:
for (int i = 0; i < n; ++i)
{
CClass newObject( i );
//
// lines of code
//
}
Since a new object is being created (is it?) for every iteration, when is
the previous object being destroyed, or is it? If not, how do I destroy
it? Do I need to, if I don't will this lead to a memory leak?
-charles
for (int i = 0; i < n; ++i)
{
CClass newObject( i );
//
// lines of code
//
}
Since a new object is being created (is it?) for every iteration, when is
the previous object being destroyed, or is it? If not, how do I destroy
it? Do I need to, if I don't will this lead to a memory leak?
-charles