Skip to content

Commit 1d9eddf

Browse files
authored
reset extractor local vulkan allocator (#6002)
resolve reclaim_blob_allocator get wild allocator warning when clear() called multple times
1 parent edfb2c6 commit 1d9eddf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/net.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2531,10 +2531,12 @@ void Extractor::clear()
25312531
if (d->local_blob_vkallocator)
25322532
{
25332533
d->net->vulkan_device()->reclaim_blob_allocator(d->local_blob_vkallocator);
2534+
d->local_blob_vkallocator = 0;
25342535
}
25352536
if (d->local_staging_vkallocator)
25362537
{
25372538
d->net->vulkan_device()->reclaim_staging_allocator(d->local_staging_vkallocator);
2539+
d->local_staging_vkallocator = 0;
25382540
}
25392541
}
25402542
#endif // NCNN_VULKAN

0 commit comments

Comments
 (0)