Fixed releasing of TextCache in InsetText.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2185 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Vigna 2001-07-05 08:29:36 +00:00
parent e441b45578
commit d937d3459d
2 changed files with 17 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2001-07-05 Juergen Vigna <jug@sad.it>
* insettext.C (clear): deleted also the cache not only LyXText.
(setParagraphData): ditto.
2001-07-04 Lars Gullik Bjønnes <larsbj@birdstep.com>
* insetfloat.C (latex): let the specific placement take presedence

View File

@ -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();