Skip to content

Commit c5ae69e

Browse files
committed
fixing format and unique pointer handling
1 parent 628868b commit c5ae69e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

onnxruntime/core/providers/openvino/contexts.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,7 @@ class SharedContext : public WeakSingleton<SharedContext> {
6565
metadata.clear();
6666
metadata_filepath.clear();
6767
external_weight_filename.clear();
68-
if (mapped_weights) {
69-
delete mapped_weights.release();
70-
}
68+
mapped_weights.reset();
7169
}
7270

7371
fs::path external_weight_filename;
@@ -76,7 +74,7 @@ class SharedContext : public WeakSingleton<SharedContext> {
7674
fs::path metadata_filepath;
7775
} shared_weights;
7876

79-
void clear(){
77+
void clear() {
8078
shared_weights.clear();
8179
}
8280
};

0 commit comments

Comments
 (0)