B
Bruno.DiStefano
Hi All,
I have a large number of objects living in a double loop (see below,
where CYCLES and NUMBER are huge).
////////////////////////////////////////////////////////////////
for (t=0; t < CYCLES; t++)
{
for(i=0; i<NUMBER;i++)
{
MyClass.run(t);
}
}
////////////////////////////////////////////////////////////////
Along the way some objects should die and vanish from my execution. I
have no way of knowing which ones and I do not care. The output of my
program is an ascii file to be processed with other programs. I just
need to make sure that the objects which are supposed to die actually
die and that all memory associated to them is released, without
altering the order in which the other objects are stored. I do not
need a list. I am using and really need a vector. Given that I should
not call a destructor explicitely, what can I do?
Thank you.
Best regards
Bruno
I have a large number of objects living in a double loop (see below,
where CYCLES and NUMBER are huge).
////////////////////////////////////////////////////////////////
for (t=0; t < CYCLES; t++)
{
for(i=0; i<NUMBER;i++)
{
MyClass.run(t);
}
}
////////////////////////////////////////////////////////////////
Along the way some objects should die and vanish from my execution. I
have no way of knowing which ones and I do not care. The output of my
program is an ascii file to be processed with other programs. I just
need to make sure that the objects which are supposed to die actually
die and that all memory associated to them is released, without
altering the order in which the other objects are stored. I do not
need a list. I am using and really need a vector. Given that I should
not call a destructor explicitely, what can I do?
Thank you.
Best regards
Bruno