libvisual icon indicating copy to clipboard operation
libvisual copied to clipboard

Core (lv-tool): Protect new display driver instances using unique_ptr

Open kaixiong opened this issue 3 years ago • 0 comments

DisplayDriverFactory::make() currently returns driver instances in raw pointers. This patch changes it to wrap them in std::unique_ptr.

Note that the various constructors stdout_driver_new(), stdout_sdl_driver_new(), etc. still return raw pointers. The driver code are meant to be externalised into loadable SOs and I'm unsure if we can return std::unique_ptr from there.

kaixiong avatar Feb 10 '23 18:02 kaixiong