On 13-Dec-2001 Jean-Marc Lasgouttes wrote:
> I applied you patch since it seems fine. However, this exposes a bug > and crashes when one uses undo in the first paragraph of a document. > For your viewing pleasure, here is what I wrote in undo_funcs.C: I don't think the patch was really thought to be commited, it was more a stuff to see if it solves leaking. After that we know that we would have to free the paragraphs. But the place is wrong! We have to release the paragraphs only at the end of the function! I think we could save the Paragraph * in a vector and then delete them at the end. That would be clean enough IMO. > bv->text->ownerParagraph(tmppar3->id(),tmppar3) Head that now we don't have ONE ownerParagraph but EVERY InsetText has it's own FIRST (owner) paragraph. So if tmppar3 is INSIDE an inset it means that it is the ownerParagraph() of that inset! > bv->text->ownerParagraph(tmppar3); Here you would only handle the case where tmppar3 == buffers-first-paragraph! > Juergen, would you care to explain what happens or (better) to provide > a fix? Sure we are still using the freed paragraphs UNTIL we have the new ones REALLY assigned. I explained it above! Jug -- -._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._ Dr. Jürgen Vigna E-Mail: [EMAIL PROTECTED] Italienallee 13/N Tel/Fax: +39-0471-450260 / +39-0471-450253 I-39100 Bozen Web: http://www.sad.it/~jug -._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._ I exist, therefore I am paid.