On Tue, 29 Oct 2002 20:12:17 +0100
Tim van Erven <[EMAIL PROTECTED]> wrote:

> On Tue, Oct 29, 2002 at 04:03:30PM -0300, Matias Aguirre <[EMAIL PROTECTED]> 
>wrote:
> > On Tue, 29 Oct 2002 19:35:00 +0100
> > Tim van Erven <[EMAIL PROTECTED]> wrote:
> > 
> >> On Tue, Oct 29, 2002 at 12:55:05PM -0500, Jon Keating <[EMAIL PROTECTED]> wrote:
> >>> On Tuesday 29 October 2002 11:41 am, Matias Aguirre wrote:
> >>>> its program is used, it must have "delete" corresponding" I was maked a
> >>>> litle script in bash that count all the new and the delete. This is the
> >>>> results:
> >>> 
> >>> You can't simply just do a script to count new and delete.
> >>> is used for many new.  And vice versa.
> >> 
> >> No, but there are more sophisticated tools available to analyse code
> >> somewhat. Has anyone ever tried running them on the licq codebase?
> > 
> > yes, I tried to use various programs that find memory leaks and the valgrind 
>return varius thinks that I dont understand ;-)
> > 
> > I attach one patch of possible memory leak.
> 
> Well, as Jon said, you can't really automate these checks. Warnings from
> programs like valgrind always have to be checked manually. I don't know
> if you did that, but if you didn't your patch really can't just be
> applied.

I did that patch on the basis of a book of C++.
What is the sintax diff of this :
  QHBoxLayout *blay = new QHBoxLayout;
  blay->addStretch(1);
  blay->addWidget(btnEnable);
  blay->addStretch(1);
  blay->addWidget(btnDisable);
  blay->addStretch(1);
  blay->addWidget(btnUnload);
  blay->addStretch(1);
  llay->addLayout(blay);
  blay = new QHBoxLayout;
  blay->addStretch(1);
  blay->addWidget(btnDetails);
  blay->addStretch(1);
  blay->addWidget(btnConfig);
  blay->addStretch(1);
  llay->addLayout(blay);

and this:

unsigned short int * pointer = new unsigned short int;
*pointer = 10;
pointer = new unsigned short int;
*pointer = 20;

The last example is a example of memory leak.
in which I am mistaken? 

-- 
 Matias Aguirre
Software Engineer
   Sinatec S.A.
Linux User #: 78193

Buenos Aires, Argentina


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Licq-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/licq-devel

Reply via email to