Move jpeg_finish_compress out of destructor by simmplecoder · Pull Request #433 · boostorg/gil
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
Added comments to explain why finish compress was moved out of destructor, and did stylistical changes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters