Converting raw pointers to shared pointers.