ref: c5091e73beeefe8e5d256bed1327233649efde74
parent: f8d5f93b16b788f7326aa7f286601810571c9e78
author: Martin Storsjö <martin@martin.st>
date: Tue Sep 16 07:02:32 EDT 2014
Remove unnecesary use of _SafeDelete It is not necessary to check whether a pointer is NULL before deleting it, "delete NULL" is explicitly ok. The deleted pointer is a local variable here, so setting it to NULL after deleting isn't necessary in these cases either.
--- a/codec/processing/src/common/WelsFrameWork.cpp
+++ b/codec/processing/src/common/WelsFrameWork.cpp
@@ -79,7 +79,7 @@
}
EResult DestroySpecificVpInterface (IWelsVP* pCtx) {
- _SafeDelete (pCtx);
+ delete pCtx;
return RET_SUCCESS;
}
--- a/codec/processing/src/common/WelsFrameWorkEx.cpp
+++ b/codec/processing/src/common/WelsFrameWorkEx.cpp
@@ -87,7 +87,7 @@
EResult DestroySpecificVpInterface (IWelsVPc* pCtx) {
if (pCtx) {
DestroySpecificVpInterface (WelsStaticCast (IWelsVP*, pCtx->pCtx));
- _SafeDelete (pCtx);
+ delete pCtx;
}
return RET_SUCCESS;