RefCounter::DecRef: Remove obsolete TODO and update comment
Bug: webrtc:10198 Change-Id: Icbcb849bdc789d9e3bb7ea6a902475a8263980bf Reviewed-on: https://webrtc-review.googlesource.com/c/117300 Commit-Queue: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#26242}
This commit is contained in:
parent
ebd9770b05
commit
a8c7326524
@ -23,9 +23,11 @@ class RefCounter {
|
|||||||
|
|
||||||
void IncRef() { rtc::AtomicOps::Increment(&ref_count_); }
|
void IncRef() { rtc::AtomicOps::Increment(&ref_count_); }
|
||||||
|
|
||||||
// TODO(nisse): Switch return type to RefCountReleaseStatus?
|
// Returns kDroppedLastRef if this call dropped the last reference; the caller
|
||||||
// Returns true if this was the last reference, and the resource protected by
|
// should therefore free the resource protected by the reference counter.
|
||||||
// the reference counter can be deleted.
|
// Otherwise, returns kOtherRefsRemained (note that in case of multithreading,
|
||||||
|
// some other caller may have dropped the last reference by the time this call
|
||||||
|
// returns; all we know is that we didn't do it).
|
||||||
rtc::RefCountReleaseStatus DecRef() {
|
rtc::RefCountReleaseStatus DecRef() {
|
||||||
return (rtc::AtomicOps::Decrement(&ref_count_) == 0)
|
return (rtc::AtomicOps::Decrement(&ref_count_) == 0)
|
||||||
? rtc::RefCountReleaseStatus::kDroppedLastRef
|
? rtc::RefCountReleaseStatus::kDroppedLastRef
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user