• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
does Leaks instrument not work correctly with C++?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: does Leaks instrument not work correctly with C++?
      • From: Ladd Van Tol <email@hidden>
    • Re: does Leaks instrument not work correctly with C++?
      • From: Nathan Ramella <email@hidden>
  • Prev by Date: Re: Subversion with xcode problems
  • Next by Date: Re: does Leaks instrument not work correctly with C++?
  • Previous by thread: Re: Subversion with xcode problems
  • Next by thread: Re: does Leaks instrument not work correctly with C++?
  • Index(es):
    • Date
    • Thread