The management of the memory is done by the client code, in this case 'main'.
What are your thoughts about this code?
Thoughts; manual memory management is a bad thing. I think it should be heavily, heavily avoided. Create objects on the stack where you can, manage them with smart pointers where you must, and use raw memory management carefully wrapped in thin manager classes where you have to work with legacy (i.e. manual memory management relying on meatspace enforcement). Writing brand new legacy code, such as this, is bad.