mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:44:02 +02:00
still recovering from troubled merge
This commit is contained in:
parent
a5cdc3c68b
commit
d749b350eb
1 changed files with 7 additions and 2 deletions
|
@ -55,10 +55,15 @@ void ShapeManagerTests::testShapeAccounting() {
|
|||
}
|
||||
|
||||
// release all references
|
||||
bool released = shapeManager.releaseShape(info);
|
||||
numReferences--;
|
||||
while (numReferences > 0) {
|
||||
shapeManager.releaseShape(info);
|
||||
released = shapeManager.releaseShape(info) && released;
|
||||
numReferences--;
|
||||
}
|
||||
if (!released) {
|
||||
std::cout << __FILE__ << ":" << __LINE__ << " ERROR: expected shape released" << std::endl;
|
||||
}
|
||||
|
||||
// verify shape still exists (not yet garbage collected)
|
||||
if (shapeManager.getNumShapes() != 1) {
|
||||
|
@ -92,7 +97,7 @@ void ShapeManagerTests::testShapeAccounting() {
|
|||
}
|
||||
|
||||
// release reference and verify that it is collected as garbage
|
||||
shapeManager.releaseShape(info);
|
||||
released = shapeManager.releaseShape(info);
|
||||
shapeManager.collectGarbage();
|
||||
if (shapeManager.getNumShapes() != 0) {
|
||||
std::cout << __FILE__ << ":" << __LINE__ << " ERROR: expected zero shapes after release" << std::endl;
|
||||
|
|
Loading…
Reference in a new issue