N
none
In my code I iterate a container of objects:
typename ContainerType::iterator it = jobs.begin();
while(it != jobs.end()) {
JobType job = (*it);
// Loads large data sets
job.Setup();
// do process 1
// do process 2
// dealocate the job!
it++;
}
When job.Setup() is called a number of very large data files are loaded into the job object. After
the job has been processed I therefore need to "kill" it from memory before setting up the following
job.
But how do I make sure that the current job object is completely removed from memory before setting
up the following job?
typename ContainerType::iterator it = jobs.begin();
while(it != jobs.end()) {
JobType job = (*it);
// Loads large data sets
job.Setup();
// do process 1
// do process 2
// dealocate the job!
it++;
}
When job.Setup() is called a number of very large data files are loaded into the job object. After
the job has been processed I therefore need to "kill" it from memory before setting up the following
job.
But how do I make sure that the current job object is completely removed from memory before setting
up the following job?