if ((idInSubShape >= 0) && (idInSubShape < myElements.size()))
{
myElements[idInSubShape] = 0; // this vector entry is no more used
- myUnusedIdElements++;
+ if ( ++myUnusedIdElements == (int) myElements.size() )
+ {
+ clearVector( myElements );
+ myUnusedIdElements = 0;
+ }
return true;
}
return false;
if ((idInSubShape >= 0) && (idInSubShape < myNodes.size()))
{
myNodes[idInSubShape] = 0; // this vector entry is no more used
- myUnusedIdNodes++;
+ if ( ++myUnusedIdNodes == (int) myNodes.size() )
+ {
+ clearVector( myNodes );
+ myUnusedIdNodes = 0;
+ }
return true;
}
return false;