diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2011-08-09 20:30:14 +0000 |
|---|---|---|
| committer | Krzysztof KosiĆski <tweenk.pl@gmail.com> | 2011-08-09 20:30:14 +0000 |
| commit | f0d6cbd77ecb7d022539e5019d2a8532f346084c (patch) | |
| tree | 0ab385dfda4d9b614be4ca5ac32daf34bdd7867e /src | |
| parent | Fix invalidation on scrolling (diff) | |
| download | inkscape-f0d6cbd77ecb7d022539e5019d2a8532f346084c.tar.gz inkscape-f0d6cbd77ecb7d022539e5019d2a8532f346084c.zip | |
Do not leak cache objects in DrawingItem destructor
(bzr r10347.1.30)
Diffstat (limited to 'src')
| -rw-r--r-- | src/display/drawing-item.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/display/drawing-item.cpp b/src/display/drawing-item.cpp index 8da59bbe2..ae3dd49ab 100644 --- a/src/display/drawing-item.cpp +++ b/src/display/drawing-item.cpp @@ -76,10 +76,8 @@ DrawingItem::~DrawingItem() // g_warning("Removing item with children"); //} - // remove from the set of cached items - if (_cached) { - _drawing._cached_items.erase(this); - } + // remove from the set of cached items and delete cache + setCached(false, true); if (_has_cache_iterator) { _drawing._candidate_items.erase(_cache_iterator); } |
