diff options
author | Robert Phillips <robertphillips@google.com> | 2017-07-21 11:38:13 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-07-21 16:18:53 +0000 |
commit | 57aa367aa3c5911cd4a21230799b147e44190282 (patch) | |
tree | 63b03042079833f226a26f734cc0229010f1429a /src/core/SkTMultiMap.h | |
parent | 8825a09fc88f46dcec1d547dfbe7457ea224790b (diff) |
Add initial version of GrResourceAllocator's free pool (take 2)
TBR=bsalomon@google.com
Change-Id: I252d0d75f9ad3911abf97495f67d5178e924dd78
Reviewed-on: https://skia-review.googlesource.com/25560
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/core/SkTMultiMap.h')
-rw-r--r-- | src/core/SkTMultiMap.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/core/SkTMultiMap.h b/src/core/SkTMultiMap.h index dc521debc9..3d6e38e454 100644 --- a/src/core/SkTMultiMap.h +++ b/src/core/SkTMultiMap.h @@ -30,8 +30,14 @@ public: SkTMultiMap() : fCount(0) {} ~SkTMultiMap() { - SkASSERT(fCount == 0); - SkASSERT(fHash.count() == 0); + typename SkTDynamicHash<ValueList, Key>::Iter iter(&fHash); + for ( ; !iter.done(); ++iter) { + ValueList* next; + for (ValueList* cur = &(*iter); cur; cur = next) { + next = cur->fNext; + delete cur; + } + } } void insert(const Key& key, T* value) { |