From d937d3459dc69325326d08d89ce9d54f9de2c2e4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrgen=20Vigna?= Date: Thu, 5 Jul 2001 08:29:36 +0000 Subject: [PATCH] Fixed releasing of TextCache in InsetText. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2185 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/ChangeLog | 5 +++++ src/insets/insettext.C | 12 ++++++++++++ 2 files changed, 17 insertions(+) diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index b166c4778d..01096cbd61 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,8 @@ +2001-07-05 Juergen Vigna + + * insettext.C (clear): deleted also the cache not only LyXText. + (setParagraphData): ditto. + 2001-07-04 Lars Gullik Bjønnes * insetfloat.C (latex): let the specific placement take presedence diff --git a/src/insets/insettext.C b/src/insets/insettext.C index d7ac5096bf..7999636826 100644 --- a/src/insets/insettext.C +++ b/src/insets/insettext.C @@ -143,6 +143,12 @@ void InsetText::clear() delete (*cit).second; (*cit).second = 0; } + // now also delete all caches this should be safe, hopefully + for (Cache::iterator cit = cache.begin(); cit != cache.end(); + cit = cache.begin()) + { + cache.erase((*cit).first); + } while (par) { Paragraph * tmp = par->next(); @@ -1506,6 +1512,12 @@ void InsetText::setParagraphData(Paragraph * p) delete (*cit).second; (*cit).second = 0; } + // now also delete all caches this should be safe, hopefully + for (Cache::iterator cit = cache.begin(); cit != cache.end(); + cit = cache.begin()) + { + cache.erase((*cit).first); + } while (par) { Paragraph * tmp = par->next(); -- 2.39.2