Browse Source

reset extractor local vulkan allocator (#6002)

resolve reclaim_blob_allocator get wild allocator warning when clear() called multple times
tags/20250428
nihui GitHub 1 year ago
parent
commit
1d9eddff8f
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      src/net.cpp

+ 2
- 0
src/net.cpp View File

@@ -2531,10 +2531,12 @@ void Extractor::clear()
if (d->local_blob_vkallocator)
{
d->net->vulkan_device()->reclaim_blob_allocator(d->local_blob_vkallocator);
d->local_blob_vkallocator = 0;
}
if (d->local_staging_vkallocator)
{
d->net->vulkan_device()->reclaim_staging_allocator(d->local_staging_vkallocator);
d->local_staging_vkallocator = 0;
}
}
#endif // NCNN_VULKAN


Loading…
Cancel
Save