Move jpeg_finish_compress out of destructor by simmplecoder · Pull Request #433 · boostorg/gil

@simmplecoder

Moving the function out will ensure
that no function that can error will
be called inside a destructor, thus
leaving no chance to get two exceptions
in flight or finishing compression even
if an error occured

@simmplecoder

Added comments to explain why finish
compress was moved out of destructor,
and did stylistical changes

@simmplecoder simmplecoder linked an issue

Feb 26, 2020

that may be closed by this pull request