Chromium Code Reviews| Index: webrtc/media/engine/webrtcvoe.h |
| diff --git a/webrtc/media/engine/webrtcvoe.h b/webrtc/media/engine/webrtcvoe.h |
| index 41a5b5fe6a157a8e47dec733018e9627ab9d80c4..45bc0689c91a71044577ff37d454c23e022f18c1 100644 |
| --- a/webrtc/media/engine/webrtcvoe.h |
| +++ b/webrtc/media/engine/webrtcvoe.h |
| @@ -13,7 +13,6 @@ |
| #include <memory> |
| -#include "webrtc/base/common.h" |
| #include "webrtc/media/engine/webrtccommon.h" |
| #include "webrtc/common_types.h" |
| @@ -31,11 +30,17 @@ class scoped_voe_engine { |
| public: |
| explicit scoped_voe_engine(webrtc::VoiceEngine* e) : ptr(e) {} |
| // VERIFY, to ensure that there are no leaks at shutdown |
|
kwiberg-webrtc
2017/02/07 09:39:49
Stale comment.
nisse-webrtc
2017/02/07 10:48:15
Updated.
|
| - ~scoped_voe_engine() { if (ptr) VERIFY(webrtc::VoiceEngine::Delete(ptr)); } |
| + ~scoped_voe_engine() { |
| + if (ptr) { |
| + bool res = webrtc::VoiceEngine::Delete(ptr); |
| + RTC_DCHECK(res); |
| + } |
| + } |
| // Releases the current pointer. |
| void reset() { |
| if (ptr) { |
| - VERIFY(webrtc::VoiceEngine::Delete(ptr)); |
| + bool res = webrtc::VoiceEngine::Delete(ptr); |
| + RTC_DCHECK(res); |
| ptr = NULL; |
| } |
| } |