Add cleanup code in module api samples

Este commit está contenido en:
Rahul Garg
2019-06-07 05:23:11 +05:30
padre f8cc4e578d
commit 2dfc912094
Se han modificado 3 ficheros con 12 adiciones y 0 borrados
@@ -105,6 +105,10 @@ int main() {
std::cout << "FAILED!\n"; std::cout << "FAILED!\n";
}; };
hipFree(Ad);
hipFree(Bd);
delete A;
delete B;
hipCtxDestroy(context); hipCtxDestroy(context);
return 0; return 0;
} }
+4
Ver fichero
@@ -97,6 +97,10 @@ int main() {
std::cout << "FAILED!\n"; std::cout << "FAILED!\n";
}; };
hipFree(Ad);
hipFree(Bd);
delete A;
delete B;
hipCtxDestroy(context); hipCtxDestroy(context);
return 0; return 0;
} }
@@ -145,6 +145,10 @@ int main() {
}; };
} }
hipFree(Ad);
hipFree(Bd);
delete A;
delete B;
hipCtxDestroy(context); hipCtxDestroy(context);
return 0; return 0;
} }