It seems that optimization leads to missing of destructor call in some cases (when local object is conditionally returned), see "Steps to Reproduce" and the attached source file for example
Version