Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
uv_type: make
~uv_type()
destructor protected
Make the destructor for `uv_type` `protected`, in order to the fix the `-Wnon-virtual-dtor` warnings: ``` ‘struct uvw::uv_type<uv_async_s>’ has virtual functions and accessible non-virtual destructor [-Werror=non-virtual-dtor] ``` As an example, the code below currently works (casting a pointer to a subclass of `uvw::uv_type` to `uvw::uv_type`, but it causes a memory leak, since only the `uvw::uv_type` destructor is called. Doing this is now forbidden. ```c++ uvw::resource<...>* will_leak; auto abc = std::unique_ptr<uvw::uv_type>(will_leak); ``` BREAKING CHANGE: This change may break the uvw ABI. It also breaks the API.
- Loading branch information