mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-09 21:50:45 +01:00
Hadrons: garbage collector clean temporaries
This commit is contained in:
parent
624246409c
commit
59aae5f5ec
@ -422,6 +422,15 @@ Environment::executeProgram(const std::vector<unsigned int> &p)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} while (continueCollect);
|
} while (continueCollect);
|
||||||
|
// free temporaries
|
||||||
|
for (unsigned int i = 0; i < object_.size(); ++i)
|
||||||
|
{
|
||||||
|
if ((object_[i].storage == Storage::temporary)
|
||||||
|
and hasCreatedObject(i))
|
||||||
|
{
|
||||||
|
freeObject(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
// any remaining objects in step i garbage collection schedule
|
// any remaining objects in step i garbage collection schedule
|
||||||
// is scheduled for step i + 1
|
// is scheduled for step i + 1
|
||||||
if (i + 1 < p.size())
|
if (i + 1 < p.size())
|
||||||
@ -687,7 +696,7 @@ bool Environment::freeObject(const unsigned int address)
|
|||||||
{
|
{
|
||||||
if (!hasOwners(address))
|
if (!hasOwners(address))
|
||||||
{
|
{
|
||||||
if (!isDryRun())
|
if (!isDryRun() and hasCreatedObject(address))
|
||||||
{
|
{
|
||||||
LOG(Message) << "Destroying object '" << object_[address].name
|
LOG(Message) << "Destroying object '" << object_[address].name
|
||||||
<< "'" << std::endl;
|
<< "'" << std::endl;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user