Leveraged C++11 constructs for automatic resource  management.