I would like a simple example on how to use the Leaks tool.
see:
#include <iostream>
int main (int argc, char * const argv[]) {
char *buf = new char[100];
sprintf(buf, "Hello, World!
");
// insert code here...
std::cout << buf;
return 0;
}
the code above(simple example) should leak the pointer allocated on *buf, right?
with valgrind I would find this very easy after a run
but I just can t find how to do this on the Leaks program
I tried to put sleep(60) but it is still not friendly to me...
thanks,
Jonathan