Change createGmmContextWrapperFunc to return unique ptr

Change-Id: I74e6c5b1a49ed19f24933edd3062c62d9256f2d8
This commit is contained in:
Mateusz Jablonski
2018-07-27 14:08:40 +02:00
committed by sys_ocldev
parent c5becf63f7
commit df2f29907c
4 changed files with 5 additions and 6 deletions

View File

@@ -37,8 +37,8 @@ class GmmClientContextBase {
MOCKABLE_VIRTUAL void destroyResInfoObject(GMM_RESOURCE_INFO *pResInfo);
GMM_CLIENT_CONTEXT *getHandle() const;
template <typename T>
static GmmClientContext *create(GMM_CLIENT clientType) {
return new T(clientType);
static std::unique_ptr<GmmClientContext> create(GMM_CLIENT clientType) {
return std::make_unique<T>(clientType);
}
protected: