Use smart pointers.