Skip to content

Commit 53df5bf

Browse files
committed
[L0 v2] make destructor of the legacy context virtual
so that v2::context will be appropriately destroyed
1 parent bb7ce92 commit 53df5bf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

source/adapters/level_zero/context.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ struct ur_context_handle_t_ : _ur_object {
4343

4444
ur_context_handle_t_(ze_context_handle_t ZeContext) : ZeContext{ZeContext} {}
4545

46+
// Make sure this is virtual so that v2::context is appropriately destroyed
47+
virtual ~ur_context_handle_t_() {}
48+
4649
// A L0 context handle is primarily used during creation and management of
4750
// resources that may be used by multiple devices.
4851
// This field is only set at ur_context_handle_t creation time, and cannot

0 commit comments

Comments
 (0)