    #include <iostream>
    #include <memory.h>

    struct B {
        B() { std::cout << "B()" << std::endl; }
        ~B() { std::cout << "~B()" << std::endl; }
    };

    int main()
    {
        std::cout << "start main" << std::endl;
        { // scope
            std::cout << "start scope" << std::endl;
            B b;
            std::cout << "end scope" << std::endl;
        } // end scope, b gets auto-destroyed.
        std::cout << "end of first example." << std::endl << std::endl ;

        { // scope
            std::cout << "start scope" << std::endl;
            void* stackStorage = alloca(sizeof(B));
            std::cout << "alloca'd" << std::endl;
            B* b = new (stackStorage) B();
            std::cout << "ctord" << std::endl;
            b->~B(); // <-- we're responsible for dtoring this object.
            std::cout << "end scope" << std::endl;
        } // <-- b gets destroyed here, but it's just a pointer.
        std::cout << "end main" << std::endl;
    }
