tests: Must destroy immutable objects before mem

Now that non-sparse objects are immutable, need to
destroy the object before freeing the associated memory.
diff --git a/tests/vktestbinding.cpp b/tests/vktestbinding.cpp
index a9d0b21..9d43aef 100644
--- a/tests/vktestbinding.cpp
+++ b/tests/vktestbinding.cpp
@@ -225,6 +225,9 @@
     if (!initialized())
         return;
 
+    if (own())
+        EXPECT(vkDestroyObject(dev_->obj(), type(), obj()) == VK_SUCCESS);
+
     if (internal_mems_) {
         delete[] internal_mems_;
         internal_mems_ = NULL;
@@ -232,9 +235,6 @@
     }
 
     mem_alloc_count_ = 0;
-
-    if (own())
-        EXPECT(vkDestroyObject(dev_->obj(), type(), obj()) == VK_SUCCESS);
 }
 
 void Object::bind_memory(const GpuMemory &mem, VkDeviceSize mem_offset)