bug-cgicc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Memory leak in cgicc v 3.1.5 ?


From: Stephen F. Booth
Subject: RE: Memory leak in cgicc v 3.1.5 ?
Date: Wed, 13 Jun 2001 18:02:59 -0500

You're correct- that is a memory leak in the assignment operator.

> It seems there is a memory leak in HTMLElement::operator= (const
> HTMLElement& element)
> 
> You should add the following two lines at the beginning of this method:
>   delete fAttributes;
>   delete fEmbedded;

I'll make the changes and incorporate them into the new release.  Thanks!

> In this case, you should modify the copy constructor in this way to avoid
> dandling pointers:
> 
> CGICCNS HTMLElement::HTMLElement(const HTMLElement& element)
>   : MStreamable(),
>     fAttributes (0),
>     fEmbedded (0)
> {
>   this->operator= (element);
> }

-Stephen



reply via email to

[Prev in Thread] Current Thread [Next in Thread]