Introduce C++ managed pointers and use for file stream objects