diff options
author | Robert Phillips <robertphillips@google.com> | 2017-07-20 15:09:23 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-07-21 11:37:23 +0000 |
commit | 6ec9a4ffe43910551d15ddc95150472aabbc8b74 (patch) | |
tree | eb7322a0bda17d800ec0df84f9df9b560ef52aea /src/core/SkTMultiMap.h | |
parent | 8b8b2244c3056cb4ee4f2ea30ff7876f0b4d2b99 (diff) |
Add initial version of GrResourceAllocator's free pool
Change-Id: Ibd60303ffb1d3ea814dad0cee3a521f94da63ca8
Reviewed-on: https://skia-review.googlesource.com/24262
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@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) { |