Memory leak when raising exception in "try finally" block.
Original Reporter info from Mantis: Samus
-
Reporter name: Paulo Sérgio
Original Reporter info from Mantis: Samus
- Reporter name: Paulo Sérgio
Description:
Memory leak when raising exception in "try finally" block.
Steps to reproduce:
Steps:
- Create new project.
- Add a Button in form.
- Program this:
procedure TForm1.Button1Click(Sender: TObject);
begin
try
StrToInt('Not an number');
finally
StrToInt('Not an number');
end;
end;
- Go to Project Options > Compiler Options > Debugging > Other debugging info.
- Check the box "Use Heaptrc unit (check for mem-leaks) (-gh)".
- Run the program.
- Click in Button.
- Close the form.
- Will be shown the box dialog with unfree memory blocks.
Additional information:
Tested in Lazarus versions: 1.8.0, 1.8.2 and 1.9.0
Mantis conversion info:
- Mantis ID: 33650
- OS: Windows
- OS Build: 10
- Platform: Desktop
- Version: 3.0.4