commit | 941da9d66171bd8efd2f6c5e25ff90c8c69885c1 | [log] [tgz] |
---|---|---|
author | reed <reed@google.com> | Sun Mar 06 13:54:00 2016 -0800 |
committer | Commit bot <commit-bot@chromium.org> | Sun Mar 06 13:54:00 2016 -0800 |
tree | a8ab867b53ab24493a2010cdd71224afaceeb791 | |
parent | 992854d62e179a589aa7366e443246e3672c3248 [diff] |
Fix behavior of sk_sp::reset(T*) and add unittest. Previously, sk_sp::reset(T* t) did not release its own reference if its internal pointer was the same as 't'. This leaks a reference. Now always release the current reference when non-nullptr. Review URL: https://codereview.chromium.org/1767983002