Hi all, today a question arised inside my mind:

If I have a cycle like this:
Classe *a;
while( ... ){
a = new Classe();
}
What happens?
Will I continue on allocating new instances of Classe on the heap or the same part of memory is used at each allocation?
Briefly,I mean for example, if I use an infinite cycle, will I run out of memory or not?

The correct way would be
Classe *a;
while( ... ){
a = new Classe();
delete a;
a = 0;//Optional
}
true?

Thanks,

Simone