Re: CVS: commit tomas_f abi/src/text/fmt/xp fp_Page.cpp

From: <msevior_at_physics.unimelb.edu.au>
Date: Fri Aug 19 2005 - 00:37:48 CEST

>
> Update of /cvsroot/abi/src/text/fmt/xp
> In directory abiword.snt.utwente.nl:/tmp/cvs-serv16589
>
> Modified Files:
> fp_Page.cpp
> Log Message:
> memory leaks
>
> Index: fp_Page.cpp
> ===================================================================
> RCS file: /cvsroot/abi/src/text/fmt/xp/fp_Page.cpp,v
> retrieving revision 1.184
> retrieving revision 1.185
> diff -u -d -r1.184 -r1.185
> --- fp_Page.cpp 7 Jul 2005 14:24:49 -0000 1.184
> +++ fp_Page.cpp 18 Aug 2005 18:35:04 -0000 1.185
> @@ -84,6 +84,9 @@
> m_pOwner = NULL;
> pDSL->deleteOwnedPage(this);
> }
> +
> + delete m_pFooter;
> + delete m_pHeader;
> }
>

Eeek! If this code works 95% of the time then I have left some bad code in
place for ages.

I'm nervous about this patch though.

Tomas, are you sure about this? It's really, really easy to get screwed up
with headers and footers and this code has the potential to cause crashes.

Have you thoroughly tested this? (ie tried big documents, documents with
several section breaks, docuemnts where you paste 4 pages worth of tables,
changing a the size of header/footer in a document with several types of
header/footers.)

I'll test things out today.

Martin

> /*!
> @@ -2210,6 +2213,8 @@
> {
> UT_ASSERT(UT_SHOULD_NOT_HAPPEN);
> (*ppHF)->getHdrFtrSectionLayout()->deletePage(this);
> +
> + UT_ASSERT_HARMLESS( ! *ppHF );
> }
> xxx_UT_DEBUGMSG(("SEVIOR: Building header container. page = %x hdrftr =
> %x \n",this,pHFSL));
>
>
> -----------------------------------------------
> To unsubscribe from this list, send a message to
> abisource-cvs-commit-request@abisource.com with the word
> unsubscribe in the message body.
>
Received on Fri Aug 19 00:37:27 2005

This archive was generated by hypermail 2.1.8 : Fri Aug 19 2005 - 00:37:28 CEST