public void Flush()
{
for (uint clusCnt = 0; clusCnt < _prj.noClu; clusCnt++)
{
Clu cluster = _prj.clu[clusCnt];
for (uint grpCnt = 0; grpCnt < cluster.noGrp; grpCnt++)
{
Grp group = cluster.grp[grpCnt];
for (uint resCnt = 0; resCnt < group.noRes; resCnt++)
if (group.resHandle[resCnt].cond != MemMan.MEM_FREED)
{
_memMan.SetCondition(group.resHandle[resCnt], MemMan.MEM_CAN_FREE);
group.resHandle[resCnt].refCount = 0;
}
}
if (cluster.file != null)
{
cluster.file.Dispose();
cluster.file = null;
cluster.refCount = 0;
}
}
_openClus = 0;
_openCluStart = _openCluEnd = null;
// the memory manager cached the blocks we asked it to free, so explicitly make it free them
_memMan.Flush();
}
}