Demonstrates automatic resource management in C++ using RAII and the Owned() method.