Skip to content

Commit e04f8bb

Browse files
Yinghai Lufacebook-github-bot
authored andcommitted
Add virtual dtor for ideep context (pytorch#10059)
Summary: Pull Request resolved: pytorch#10059 Without virtual dtor, it could induce incorrect sized deallocation, messing up the memory. And unfortunately, sized deallocation cannot be detected by ASAN, yet. Reviewed By: jerryzh168 Differential Revision: D9080526 fbshipit-source-id: c136cf653134e75b074326be2bc03627da42446f
1 parent d217856 commit e04f8bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

caffe2/ideep/utils/ideep_context.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class IDEEPContext final : public BaseContext {
2121
CAFFE_ENFORCE_EQ(option.device_type(), IDEEP);
2222
}
2323

24-
~IDEEPContext() noexcept {}
24+
~IDEEPContext() noexcept override {}
2525

2626
BaseStaticContext* GetStaticContext() const override {
2727
return GetIDEEPStaticContext();

0 commit comments

Comments
 (0)