#include <iostream>

class Example {
    private:
        int a;
        // lots of important variables from the heap
    public:
        int getA() { return a; }
        
        Example() {
        	std::cout << "constructor" << std::endl;	
        }
        
        ~Example() {
        	std::cout << "destructor" << std::endl;
        	// we have no heap variables, but those would be deleted here
        }
};

int main() {
	for (int i = 0; i < 5; i++) {
		Example e;
		// scope of e ends, so destructor is called
	}
}