9e8bbc1129
If hooks are not unregistered Blender will report a leak on exit. Store the hooks as unique_ptrs to remove manual memory management and encapsulate the previous global list inside a function. These changes ensure that everything is cleaned up on termination. Also makes a small change to the hook documentation for a missing `import` statement. Pull Request: https://projects.blender.org/blender/blender/pulls/118294