Fix leaks in the Export dialog

This MR plugs some memory leaks in the Export Dialog reported to me by @nathanal. The memory management in the dialog and associated classes is refactored and redesigned.

Owning pointers are replaced by std::unique_ptr, so BatchItems no longer leak.

Additionally, some small fixes and refactors are made:

  • class ExportPreview is shrunk by 24 bytes of padding;
  • declaration of the BatchItem class is moved to the corresponding header file;
  • unused function arguments are removed;
  • code is reformatted in a few places to better follow the recommended style.

Merge request reports

Loading