diff --git a/MoltenVK/MoltenVK/GPUObjects/MVKVulkanAPIObject.h b/MoltenVK/MoltenVK/GPUObjects/MVKVulkanAPIObject.h index 35f83974..eab909cd 100644 --- a/MoltenVK/MoltenVK/GPUObjects/MVKVulkanAPIObject.h +++ b/MoltenVK/MoltenVK/GPUObjects/MVKVulkanAPIObject.h @@ -63,7 +63,7 @@ public: * Called when this instance has been retained as a reference by another object, * indicating that this instance will not be deleted until that reference is released. */ - void retain(); + inline void retain() { _refCount++; } /** * Called when this instance has been released as a reference from another object. @@ -71,14 +71,14 @@ public: * If the destroy() function has already been called on this instance by the time * this function is called, this instance will be deleted. */ - void release(); + inline void release() { if (--_refCount == 0) { MVKConfigurableObject::destroy(); } } /** * Marks this instance as destroyed. If all previous references to this instance * have been released, this instance will be deleted, otherwise deletion of this * instance will automatically be deferred until all references have been released. */ - void destroy() override; + void destroy() override { release(); } /** Gets the debug object name of this instance. */ inline NSString* getDebugName() { return _debugName; } diff --git a/MoltenVK/MoltenVK/GPUObjects/MVKVulkanAPIObject.mm b/MoltenVK/MoltenVK/GPUObjects/MVKVulkanAPIObject.mm index ec5fef03..36998bc6 100644 --- a/MoltenVK/MoltenVK/GPUObjects/MVKVulkanAPIObject.mm +++ b/MoltenVK/MoltenVK/GPUObjects/MVKVulkanAPIObject.mm @@ -24,18 +24,6 @@ using namespace std; #pragma mark - #pragma mark MVKVulkanAPIObject -void MVKVulkanAPIObject::retain() { - _refCount++; -} - -void MVKVulkanAPIObject::release() { - if (--_refCount == 0) { MVKConfigurableObject::destroy(); } -} - -void MVKVulkanAPIObject::destroy() { - release(); -} - VkResult MVKVulkanAPIObject::setDebugName(const char* pObjectName) { if (pObjectName) { [_debugName release];