YaaZ / VulkanMemoryAllocator-Hpp

C++ bindings for VulkanMemoryAllocator
Creative Commons Zero v1.0 Universal
57 stars 31 forks source link

dangling pointer in UniqueHandle #38

Closed qbojj closed 8 months ago

qbojj commented 9 months ago

UniqueHandles have Owner as const vma::Allocator *. but allocator is not a holding type so:

vma::UniqueAllocator alloc;

std::pair<vma::UniqueBuffer, vma::UniqueAllocation> p;
{
  vma::Allocator a = *alloc;
  p = a.createBufferUnique(...);
}

// now owner of p.first/second is dangling