Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 3

Qt-interest Archive, March 2002
memprof and qt


Message 1 in thread

Has anyone had any luck getting a qt application to work with memprof?

I can get this to work with memprof and it reports a memory leak:

#include <iostream>
using namespace std;

int main()
{
  int* a = new int;
  a=NULL;

  int b;
  cout << "int: ";
  cin >> b;


}


However, I cannot get it to work with this program:

#include <iostream>
#include <qapplication.h>
using namespace std;

int main(int argc, char** argv)
{
  QApplication app(argc, argv);
  int* a = new int;
  a=NULL;

  int b;
  cout << "int: ";
  cin >> b;
}


Anybody know why?

Thanks,
Clint


Message 2 in thread

Clinton Stimpson wrote:
Clinton,

I have also tried memprof with Qt without success, If anyone has a better
option please tell me, thank you.

/G

> Has anyone had any luck getting a qt application to work with memprof?
>
> I can get this to work with memprof and it reports a memory leak:
>
> #include <iostream>
> using namespace std;
>
> int main()
> {
>   int* a = new int;
>   a=NULL;
>
>   int b;
>   cout << "int: ";
>   cin >> b;
>
> }
>
> However, I cannot get it to work with this program:
>
> #include <iostream>
> #include <qapplication.h>
> using namespace std;
>
> int main(int argc, char** argv)
> {
>   QApplication app(argc, argv);
>   int* a = new int;
>   a=NULL;
>
>   int b;
>   cout << "int: ";
>   cin >> b;
> }
>
> Anybody know why?
>
> Thanks,
> Clint
>
> --
> List archive and information: http://qt-interest.trolltech.com

--
 [ signature omitted ]