Skip to content

Commit

Permalink
Move destructor to fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
MolotovCherry committed Dec 10, 2023
1 parent e679071 commit 0810db7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions waifu2x/waifu2x.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,6 @@ class waifu2x

this->vkdev->reclaim_blob_allocator(this->net.opt.blob_vkallocator);
this->vkdev->reclaim_staging_allocator(this->net.opt.staging_vkallocator);

ncnn::destroy_gpu_instance();
}
void load_models(const unsigned char* param, const unsigned char* model)
{
Expand Down Expand Up @@ -487,4 +485,6 @@ extern "C" void free_waifu2x(waifu2x_config * config, waifu2x * processer)
delete config;
if (processer)
delete processer;

ncnn::destroy_gpu_instance();
}

0 comments on commit 0810db7

Please sign in to comment.