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

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: rebase 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
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
tommi 2016/03/17 09:15:12 is this still true? (if so, please leave the comme
pbos-webrtc 2016/03/17 15:04:00 Not true anymore, since the creation does AddRef()
tommi 2016/03/17 15:10:56 I'm not following... the previous code already did
pbos-webrtc 2016/03/21 10:04:31 That it did not do AddRef() which is now done impl
tommi 2016/03/21 11:23:21 Oh I see! Yikes, that could also be an invite to
- // non-freed memory.
- vcm_ = NULL;
+ // Release reference to VCM.
+ vcm_ = nullptr;
}
VcmCapturer::~VcmCapturer() { Destroy(); }

Powered by Google App Engine
This is Rietveld 408576698