does Leaks instrument not work correctly with C++?
does Leaks instrument not work correctly with C++?
- Subject: does Leaks instrument not work correctly with C++?
- From: email@hidden
- Date: Sun, 01 Mar 2009 10:23:49 -0500
Xcode version 3.1.2 (that came with the 2.2.1 iPhone SDK)
I tried the leak instrument on my iPhone app and was impressed how
nice it was to use - pointed out two small memory leaks I had missed.
I teach C++ programming at the college level and was thinking about
showing my students how to use it (more and more of them have Macs and
we also have a Mac Mini lab), but it doesn't seem to work well with C+
+. Am I doing something wrong or this is a known issue?
Here's a simple program that Leaks does not report any leaks (although
you can tell from ObjectAlloc that the memory usage continued to grow).
#include <iostream>
using namespace std;
int main (int argc, char * const argv[]) {
int *p;
for (int i=0; i<10; ++i) {
cout << i << endl;
p = new int[256];
sleep(2);
}
return 0;
}
Thanks,
Dave
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden