#include /* run this program using the console pauser or add your own getch, system("pause") or input loop */ using namespace std; int main(int argc, char** argv) { int *ptr, counter; counter=0; while(1){ counter++; ptr=new int; if((counter%10)==0) cout << "Alocou " << counter << " Inteiros" << endl; delete ptr; // Ver com o top, as consequencias de uso do comando delete } return 0; }