diff --git a/samples/0_Intro/module_api/launchKernelHcc.cpp b/samples/0_Intro/module_api/launchKernelHcc.cpp index 5ccd0801d1..4ff000d1af 100644 --- a/samples/0_Intro/module_api/launchKernelHcc.cpp +++ b/samples/0_Intro/module_api/launchKernelHcc.cpp @@ -105,6 +105,10 @@ int main() { std::cout << "FAILED!\n"; }; + hipFree(Ad); + hipFree(Bd); + delete A; + delete B; hipCtxDestroy(context); return 0; } diff --git a/samples/0_Intro/module_api/runKernel.cpp b/samples/0_Intro/module_api/runKernel.cpp index eccc105319..a011b42666 100644 --- a/samples/0_Intro/module_api/runKernel.cpp +++ b/samples/0_Intro/module_api/runKernel.cpp @@ -97,6 +97,10 @@ int main() { std::cout << "FAILED!\n"; }; + hipFree(Ad); + hipFree(Bd); + delete A; + delete B; hipCtxDestroy(context); return 0; } diff --git a/samples/0_Intro/module_api_global/runKernel.cpp b/samples/0_Intro/module_api_global/runKernel.cpp index 76af21b0f9..1e10dba5c6 100644 --- a/samples/0_Intro/module_api_global/runKernel.cpp +++ b/samples/0_Intro/module_api_global/runKernel.cpp @@ -145,6 +145,10 @@ int main() { }; } + hipFree(Ad); + hipFree(Bd); + delete A; + delete B; hipCtxDestroy(context); return 0; }