Add xglDestroyDevice() call to test framework.
authorTobin Ehlis <tobin@lunarg.com>
Thu, 23 Oct 2014 19:45:13 +0000 (13:45 -0600)
committerCourtney Goeltzenleuchter <courtney@LunarG.com>
Thu, 30 Oct 2014 00:02:02 +0000 (18:02 -0600)
layers/object_track.c

index e0a99f6..697c8e5 100644 (file)
@@ -378,6 +378,12 @@ XGL_LAYER_EXPORT XGL_RESULT XGLAPI xglDestroyDevice(XGL_DEVICE device)
     XGL_RESULT result = nextTable.DestroyDevice(device);
     printf("OBJ[%llu] : DESTROY device object %p\n", object_track_index++, (void*)device);
     ll_remove_obj((XGL_VOID*)device);
+    // Report any remaining objects in LL
+    objNode *pTrav = pObjLLHead;
+    while (pTrav) {
+        printf("OBJ ERROR : %s object %p has not been destroyed (was used %lu times).\n", pTrav->objType, pTrav->pObj, pTrav->numUses);
+        pTrav = pTrav->pNext;
+    }
     return result;
 }