Merge pull request #1164 from gargrahul/cleanup_module_api_samples
Add cleanup code in module api samples
This commit is contained in:
commit
439b6e41d4
3 files changed
+12
No files matched your search
@@ -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;
|
||||||
}
|
}
|
||||||
@@ -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;
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user