Chromium Code Reviews| 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(); } |