Hi,
On 8 Mar 2001, Jean-Marc Lasgouttes wrote:
| And if you load a file?
~/bin/LeakCheck ./src/lyx -x lyx-quit /usr/share/lyx/doc/UserGuide.lyx
yields, ahem, several (425) leaks at 39 different places (total 25716
Bytes), but only in the formula stuff which is currenly worked on, so
expected to be fixed someday. Other than that: look pretty good!
ciao,
-hen
report as follows:
#-- Leak: counted 19x / total Size: 224
0x80ea902 is in flyx_ident_extract(char const *) (lyx_gui_misc.C:204).
203
204 char * sb = new char[se - sc + 1];
#-- Leak: counted 1x / total Size: 352
0x81769f6 is in mathed_init_fonts(void) (formula.C:177).
176 {
177 Math_Fonts = new LyXFont[8]; //DEC cxx cannot initialize all fonts
#-- Leak: counted 5x / total Size: 280
0x8176c68 is in InsetFormula::InsetFormula(bool) (formula.C:212).
211 {
212 par = new MathParInset; // this leaks
#-- Leak: counted 2x / total Size: 8
0x817cc13 is in InsetFormulaMacro::InsetFormulaMacro(void)
(../../boost/boost/smart_ptr.hpp:148).
147 #else
148 pn = new long(1);
#-- Leak: counted 3x / total Size: 228
0x8180e79 is in MathDecorationInset::Clone(void) (math_decorationinset.C:31).
30 {
31 return new MathDecorationInset(*this);
#-- Leak: counted 40x / total Size: 2880
0x8181241 is in MathDelimInset::Clone(void) (math_deliminset.C:24).
23 {
24 return new MathDelimInset(*this);
#-- Leak: counted 3x / total Size: 108
0x81816b2 is in MathDotsInset::Clone(void) (math_dotsinset.C:20).
19 {
20 return new MathDotsInset(name, code_, GetStyle());
#-- Leak: counted 30x / total Size: 3960
0x8181bbe is in MathFracInset::Clone(void) (math_fracinset.C:30).
29 {
30 MathFracInset * p = new MathFracInset(*this);
#-- Leak: counted 16x / total Size: 512
0x818210e is in MathFuncInset::Clone(void) (math_funcinset.C:29).
28 {
29 return new MathFuncInset(name, GetType(), GetStyle());
#-- Leak: counted 3x / total Size: 252
0x818409f is in MathMacro::Clone(void) (math_macro.C:71).
70 {
71 return new MathMacro(*this);
#-- Leak: counted 3x / total Size: 252
0x81855c2 is in MathMacroTable::createMacro(basic_string<char,
string_char_traits<char>, __default_alloc_template<true, 0> > const &) const
(math_macrotable.C:29).
28 boost::shared_ptr<MathMacroTemplate> mt = getTemplate(name);
29 return (mt.get()) ? new MathMacro(mt) : 0;
#-- Leak: counted 1x / total Size: 52
0x81859e7 is in MathMacroTable::builtinMacros(void) (math_macrotable.C:63).
62 iter.insertInset(new MathAccentInset(LM_in, LM_TC_BOPS,
LM_not),
63 LM_TC_INSET);
#-- Leak: counted 1x / total Size: 52
0x8185bb7 is in MathMacroTable::builtinMacros(void) (math_macrotable.C:74).
73 iter.insertInset(new MathAccentInset('O', LM_TC_RM, LM_not),
74 LM_TC_INSET);
#-- Leak: counted 1x / total Size: 72
0x8185f42 is in MathMacroTable::builtinMacros(void) (math_macrotable.C:94).
93 MathedIter iter(&array);
94 MathParInset * inset = new MathDelimInset('(', ')');
#-- Leak: counted 1x / total Size: 132
0x8185fa9 is in MathMacroTable::builtinMacros(void) (math_macrotable.C:98).
97 MathedIter iter2(&array);
98 MathFracInset * frac = new MathFracInset(LM_OT_ATOP);
#-- Leak: counted 2x / total Size: 72
0x818696a is in MathMatrixInset::MathMatrixInset(MathMatrixInset const &)
(math_rowst.h:70).
69 explicit MathedRowSt(int n)
70 : MathedRowStruct(n), next_(0)
#-- Leak: counted 21x / total Size: 1848
0x8186d97 is in MathMatrixInset::Clone(void) (math_matrixinset.C:80).
79 {
80 return new MathMatrixInset(*this);
#-- Leak: counted 34x / total Size: 1904
0x8188f15 is in MathParInset::Clone(void) (math_parinset.C:45).
44 {
45 return new MathParInset(*this);
#-- Leak: counted 11x / total Size: 572
0x818ab98 is in doAccent(unsigned char, MathedTextCodes) (math_parser.C:382).
381 if (i == accent - 1)
382 ac = new MathAccentInset(c, t, nestaccent[i]);
#-- Leak: counted 2x / total Size: 168
0x818b0c3 is in mathed_parse(MathedArray &, unsigned int, MathParInset **)
(math_parser.C:475).
474 }
475 macro = new MathMacroTemplate(name, na);
#-- Leak: counted 15x / total Size: 840
0x818b5f7 is in mathed_parse(MathedArray &, unsigned int, MathParInset **)
(math_parser.C:562).
561 MathParInset * p = new MathParInset(size, "",
562 LM_OT_SCRIPT);
#-- Leak: counted 12x / total Size: 672
0x818b731 is in mathed_parse(MathedArray &, unsigned int, MathParInset **)
(math_parser.C:574).
573 MathParInset * p = new MathParInset(size, "",
574 LM_OT_SCRIPT);
#-- Leak: counted 10x / total Size: 360
0x818bda2 is in mathed_parse(MathedArray &, unsigned int, MathParInset **)
(math_parser.C:617).
616 {
617 binset = new MathBigopInset(yylval.l->name,
yylval.l->id);
#-- Leak: counted 4x / total Size: 128
0x818bf2c is in mathed_parse(MathedArray &, unsigned int, MathParInset **)
(math_parser.C:630).
629 } else {
630 MathFuncInset * bg = new
MathFuncInset(yylval.l->name);
#-- Leak: counted 19x / total Size: 608
0x818c091 is in mathed_parse(MathedArray &, unsigned int, MathParInset **)
(math_parser.C:657).
656 if (yylval.i >= 0) {
657 MathSpaceInset * sp = new
MathSpaceInset(yylval.i);
#-- Leak: counted 1x / total Size: 36
0x818c11b is in mathed_parse(MathedArray &, unsigned int, MathParInset **)
(math_parser.C:664).
663 {
664 MathDotsInset * p = new MathDotsInset(yylval.l->name,
yylval.l->id);
#-- Leak: counted 15x / total Size: 1980
0x818c1c7 is in mathed_parse(MathedArray &, unsigned int, MathParInset **)
(math_parser.C:674).
673 {
674 MathFracInset * fc = new MathFracInset(fractype);
#-- Leak: counted 5x / total Size: 320
0x818c34c is in mathed_parse(MathedArray &, unsigned int, MathParInset **)
(math_parser.C:700).
699 yyis->putback(c);
700 rt = new MathSqrtInset(size);
#-- Leak: counted 20x / total Size: 1440
0x818c465 is in mathed_parse(MathedArray &, unsigned int, MathParInset **)
(math_parser.C:721).
720 rgd = (rgd == LM_TK_SYM) ? yylval.l->id:
yylval.i;
721 MathDelimInset * dl = new MathDelimInset(lfd, rgd);
#-- Leak: counted 2x / total Size: 152
0x818c620 is in mathed_parse(MathedArray &, unsigned int, MathParInset **)
(math_parser.C:746).
745 {
746 MathDecorationInset * sq = new
MathDecorationInset(yylval.l->id,
#-- Leak: counted 5x / total Size: 160
0x818c77a is in mathed_parse(MathedArray &, unsigned int, MathParInset **)
(math_parser.C:769).
768 } else {
769 MathedInset * bg = new
MathFuncInset(yylval.l->name);
#-- Leak: counted 7x / total Size: 224
0x818c882 is in mathed_parse(MathedArray &, unsigned int, MathParInset **)
(math_parser.C:776).
775 data.insertInset(new MathFuncInset(yylval.l->name,
LM_OT_FUNCLIM),
776 LM_TC_INSET);
#-- Leak: counted 10x / total Size: 880
0x818ce38 is in mathed_parse(MathedArray &, unsigned int, MathParInset **)
(math_parser.C:830).
829 int const nc = parse_align(ar, ar2);
830 MathParInset * mm = new MathMatrixInset(nc, 0);
#-- Leak: counted 39x / total Size: 1248
0x818e492 is in MathSpaceInset::Clone(void) (math_spaceinset.C:23).
22 {
23 return new MathSpaceInset(space_, GetType(), GetStyle());
#-- Leak: counted 10x / total Size: 360
0x819150b is in MathedXIter::adjustVerticalSt(void) (math_rowst.h:70).
69 explicit MathedRowSt(int n)
70 : MathedRowStruct(n), next_(0)
#-- Leak: counted 13x / total Size: 468
0x81916b2 is in MathedXIter::adjustVerticalSt(void) (math_rowst.h:70).
69 explicit MathedRowSt(int n)
70 : MathedRowStruct(n), next_(0)
#-- Leak: counted 5x / total Size: 320
0x8193225 is in MathSqrtInset::Clone(void) (math_sqrtinset.C:23).
22 {
23 return new MathSqrtInset(*this);
#-- Leak: counted 23x / total Size: 1196
0x8193740 is in MathAccentInset::Clone(void) (math_accentinset.C:35).
34 else
35 p = new MathAccentInset(c, fn, code, GetStyle());
#-- Leak: counted 11x / total Size: 396
0x8193d6e is in MathBigopInset::Clone(void) (math_bigopinset.C:18).
17 {
18 return new MathBigopInset(name, sym_, GetStyle());