Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Unified Diff: webrtc/test/vcm_capturer.cc

Issue 1477013005: Replace RefCountImpl with rtc::RefCountedObject. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: add back explicit Release()s in test Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/test/vcm_capturer.h ('k') | webrtc/video/video_capture_input_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/test/vcm_capturer.cc
diff --git a/webrtc/test/vcm_capturer.cc b/webrtc/test/vcm_capturer.cc
index 0a82236c9880487968c147938ecca7c8b83f26f9..792b97ff0883f7157a9f11f9cff622a9885b23b3 100644
--- a/webrtc/test/vcm_capturer.cc
+++ b/webrtc/test/vcm_capturer.cc
@@ -79,17 +79,13 @@ void VcmCapturer::Stop() {
}
void VcmCapturer::Destroy() {
- if (vcm_ == NULL) {
+ if (!vcm_)
return;
- }
vcm_->StopCapture();
vcm_->DeRegisterCaptureDataCallback();
- vcm_->Release();
-
- // TODO(pbos): How do I destroy the VideoCaptureModule? This still leaves
- // non-freed memory.
- vcm_ = NULL;
+ // Release reference to VCM.
+ vcm_ = nullptr;
}
VcmCapturer::~VcmCapturer() { Destroy(); }
« no previous file with comments | « webrtc/test/vcm_capturer.h ('k') | webrtc/video/video_capture_input_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698