Specify destructor function in smart pointer lib?

I am creating a pointer to a nonUObject that runs its own process., I want to use TSharedRef in the game instance constructor to manage it within the Unreal editor, but this process is started and stopped via factory functions.

Is there any way to specify the destructor function for TSharedPtr to use, like std::smart_ptr has? Otherwise, I have to use bare C++ pointers and I’d prefer not to/.