mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 14:02:58 +08:00
Fix Memory leak in drm_memory_manager of OsHandleLinux
Add virtual deconstructor to OsHandle and deconstructor to OsHandleLinux Add override keyword to destructor Add overriding deconstructor to OsHandleWin Add newline before private members https://github.com/intel/compute-runtime/pull/550 Signed-off-by: Cameron S Murtagh <cameron.murtagh00@gmail.com> Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
5cc81206ac
commit
60c819bb72
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -14,6 +14,8 @@
|
||||
namespace NEO {
|
||||
|
||||
struct OsHandle {
|
||||
virtual ~OsHandle() = default;
|
||||
|
||||
protected:
|
||||
OsHandle() = default;
|
||||
};
|
||||
|
||||
@@ -18,6 +18,7 @@ enum class CachePolicy : uint32_t;
|
||||
enum class CacheRegion : uint16_t;
|
||||
|
||||
struct OsHandleLinux : OsHandle {
|
||||
~OsHandleLinux() override = default;
|
||||
BufferObject *bo = nullptr;
|
||||
};
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
namespace NEO {
|
||||
|
||||
struct OsHandleWin : OsHandle {
|
||||
~OsHandleWin() override = default;
|
||||
D3DKMT_HANDLE handle = 0;
|
||||
D3DGPU_VIRTUAL_ADDRESS gpuPtr = 0;
|
||||
Gmm *gmm = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user