void MyFunc( void ) { int i; // on the stack SomeClass o; // o the object reference o will be on the stack o = new SomeClass; // the actual object is on the heap for ( i = 0; i < 10; i++ ) { int j; // create a new stack item j j = i * i; } // j no longer exists }>