Libvisual / libvisual

Libvisual Audio Visualization
http://libvisual.org/
81 stars 31 forks source link

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

Open kaixiong opened 1 year ago

kaixiong commented 1 year ago

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.