Another leak spotted by purify:
MLK: 9856 bytes leaked in 3 blocks
This memory was allocated from:
malloc [rtlib.o]
insert_aux__t6vector2ZQ212LyXParagraph9FontTableZt24__default_alloc_template2b0i0PQ212LyXParagraph9FontTableRCQ212LyXParagraph9FontTable
[stl_alloc.h:151]
LyXParagraph::SetFont(int,const LyXFont&) [stl_vector.h:164]
++finish;
}
else
=> insert_aux(position, x);
return begin() + n;
}
iterator insert(iterator position) { return insert(position, T());
}
LyXParagraph::InsertChar(int,char,const LyXFont&) [paragraph.C:679]
Buffer::parseSingleLyXformat2Token(LyXLex&,LyXParagraph*&,LyXParagraph*&,const
lyxstring&,int&,char&,LyXFont&,LyXParagraph::footnote_flag&,LyXParagraph::footnote_kind&)
[buffer.C:920]
LyXTabular::OldFormatRead(LyXLex&,const lyxstring&) [tabular.C:1289]
Block of 5632 bytes at 0x7f1dd0
Block of 2816 bytes at 0xb4aee8
Block of 1408 bytes at 0xa91130
I am not sure whether this heppens for _each_ call to SetFont, but I
wonder whether calls like
fontlist.insert(fontlist.begin() + i+1,
FontTable(pos, font));
create a copy of the fonttabe before inserting in the fontlist,
therefore leaking the object created by FontTable().
Lars? A comment?
JMarc