mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 21:18:24 +08:00
fix: Move Event resource cleanup do destroy function
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
d3541a8149
commit
f4f6bc799e
@@ -41,10 +41,6 @@ template Event *Event::create<uint32_t>(EventPool *, const ze_event_desc_t *, De
|
||||
template Event *Event::create<uint64_t>(const EventDescriptor &, const ze_event_desc_t *, Device *);
|
||||
template Event *Event::create<uint32_t>(const EventDescriptor &, const ze_event_desc_t *, Device *);
|
||||
|
||||
Event::~Event() {
|
||||
resetInOrderTimestampNode(nullptr);
|
||||
}
|
||||
|
||||
ze_result_t EventPool::initialize(DriverHandle *driver, Context *context, uint32_t numDevices, ze_device_handle_t *deviceHandles) {
|
||||
this->context = static_cast<ContextImp *>(context);
|
||||
|
||||
@@ -386,6 +382,7 @@ ze_result_t EventPool::openEventPoolIpcHandle(const ze_ipc_event_pool_handle_t &
|
||||
}
|
||||
|
||||
ze_result_t Event::destroy() {
|
||||
this->resetInOrderTimestampNode(nullptr);
|
||||
delete this;
|
||||
return ZE_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ struct EventDescriptor {
|
||||
};
|
||||
|
||||
struct Event : _ze_event_handle_t {
|
||||
virtual ~Event();
|
||||
virtual ~Event() = default;
|
||||
virtual ze_result_t destroy();
|
||||
virtual ze_result_t hostSignal(bool allowCounterBased) = 0;
|
||||
virtual ze_result_t hostSynchronize(uint64_t timeout) = 0;
|
||||
|
||||
Reference in New Issue
Block a user