|
Hi,
I've started using mpatrol on my Fedora linux and looks very
interesting. I am trying all the test programs on my own as well as
in the test suites. I've some observations on detecting the memory
leaks when we use streams objects.Like
#include <iostream.h>
#include <strstream>
using namespace std;
#include "mpatrol.h"
int
main( )
{
ostrstream str;
str<<"Hello world!!!"<<endl;
str<<ends;
cerr<<str.str(); //This is a leak
return 0;
}
When I run the program, the mpatrol.log doesn't show the memory leak
at the place where I have given a comment as leak. How to check this leak.
One more question, how to test memory leaks on the existing feature
which runs continuosly....since the log file shall be generated only
at the exit point of the main program...we have program which runs
continuosly...never exit unless otherwise if we kill with signal.
Can someone guide how to solve these problems.
Thankx in advance.
Shiva
|