Skip to content

Fix variant fallback

lh1887 requested to merge feature/fix-variant into master

There is memory leaking in the current implementation of variant. When a variant is destructed (or changes the object which is held), only the memory where it's stored will be free'd but the object itself won't get properly destructed. This MR fixes this by implementing destructor, copy/move constructors and assignments (essentially the Rule of five).

Commits 7ed6f034 and 17a6d11b are not strictly necessary in this context but I didn't want to open another MR for these.

Merge request reports

Loading