This commit is contained in:
yefeng 2022-08-29 15:00:24 +08:00
parent 0971a33fcb
commit 1fdfa30dbd
1 changed files with 6 additions and 2 deletions

View File

@ -183,13 +183,17 @@ void PackWeightManager::Free(void *tensor_data) {
void PackWeightManager::FreePackWeight(std::vector<char *> model_bufs) {
#ifdef SHARING_MODEL_WEIGHT
pack_weight_->FreePackWeight(model_bufs, false);
if (pack_weight_ != nullptr) {
pack_weight_->FreePackWeight(model_bufs, false);
}
#endif
return;
}
void PackWeightManager::DeleteOriginModelBufInfo(const char *model_buf) {
#ifdef SHARING_MODEL_WEIGHT
pack_weight_->DeleteOriginModelBufInfo(model_buf);
if (pack_weight_ != nullptr) {
pack_weight_->DeleteOriginModelBufInfo(model_buf);
}
#endif
return;
}