Moved to smart pointers