[llvm] [SYCL][LLVM] Adding property set I/O library for SYCL (PR #110771)

Arvind Sudarsanam via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 16 10:22:30 PDT 2024


================
@@ -66,8 +66,13 @@ class SYCLPropertyValue {
     return static_cast<Type>(T);
   }
 
-  ~SYCLPropertyValue() {}
-
+  ~SYCLPropertyValue() {
+    if (std::holds_alternative<std::byte *>(Val)) {
+      auto ByteArrayVal = std::get<std::byte *>(Val);
+      if (ByteArrayVal)
+        delete[] ByteArrayVal;
----------------
asudarsa wrote:

Hi @arsenm 

I added use of unique_ptr in 0d5af17a958984fba156a95e6adf7a5b6879c1f2
It was a good learning curve for me.

Thanks
Sincerely

https://github.com/llvm/llvm-project/pull/110771


More information about the llvm-commits mailing list