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

Unified Diff: webrtc/system_wrappers/include/ref_count.h

Issue 1465113002: Fix memory leak in vcm_capturer.cc. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: modify ref_count.h, init ref_count to 1 after new Created 5 years, 1 month 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 | « no previous file | webrtc/test/vcm_capturer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/system_wrappers/include/ref_count.h
diff --git a/webrtc/system_wrappers/include/ref_count.h b/webrtc/system_wrappers/include/ref_count.h
index 3dd335a8dac2a36776e4ffbf372f385ae92ec909..2a7489775989ce7bc915b477134680878207a23d 100644
--- a/webrtc/system_wrappers/include/ref_count.h
+++ b/webrtc/system_wrappers/include/ref_count.h
@@ -43,23 +43,23 @@ namespace webrtc {
template <class T>
class RefCountImpl : public T {
public:
- RefCountImpl() : ref_count_(0) {}
+ RefCountImpl() : ref_count_(1) {}
template<typename P>
- explicit RefCountImpl(P p) : T(p), ref_count_(0) {}
+ explicit RefCountImpl(P p) : T(p), ref_count_(1) {}
template<typename P1, typename P2>
- RefCountImpl(P1 p1, P2 p2) : T(p1, p2), ref_count_(0) {}
+ RefCountImpl(P1 p1, P2 p2) : T(p1, p2), ref_count_(1) {}
template<typename P1, typename P2, typename P3>
- RefCountImpl(P1 p1, P2 p2, P3 p3) : T(p1, p2, p3), ref_count_(0) {}
+ RefCountImpl(P1 p1, P2 p2, P3 p3) : T(p1, p2, p3), ref_count_(1) {}
template<typename P1, typename P2, typename P3, typename P4>
- RefCountImpl(P1 p1, P2 p2, P3 p3, P4 p4) : T(p1, p2, p3, p4), ref_count_(0) {}
+ RefCountImpl(P1 p1, P2 p2, P3 p3, P4 p4) : T(p1, p2, p3, p4), ref_count_(1) {}
template<typename P1, typename P2, typename P3, typename P4, typename P5>
RefCountImpl(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5)
- : T(p1, p2, p3, p4, p5), ref_count_(0) {}
+ : T(p1, p2, p3, p4, p5), ref_count_(1) {}
int32_t AddRef() const override {
return ++ref_count_;
« no previous file with comments | « no previous file | webrtc/test/vcm_capturer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698