Yes. Without the exception handling this is what I get.
So the page returns a 404.
Get only expects a 200 and otherwise throws an exception.
Internally there is a leak that with throwing an exception something is not freed.
But then it's weird that if I handle the exception at a higher level that block does get freed.
An unhandled exception occurred at $00414579:
EHTTPClient: Unexpected response status code: 404
$00414579 TFPCUSTOMHTTPCLIENT__READRESPONSE, line 1089 of ./fcl-web/src/base/fphttpclient.pp
$00414E75 TFPCUSTOMHTTPCLIENT__DONORMALREQUEST, line 1179 of ./fcl-web/src/base/fphttpclient.pp
$00415133 TFPCUSTOMHTTPCLIENT__DOMETHOD, line 1232 of ./fcl-web/src/base/fphttpclient.pp
$004156A9 TFPCUSTOMHTTPCLIENT__HTTPMETHOD, line 1331 of ./fcl-web/src/base/fphttpclient.pp
$00415867 TFPCUSTOMHTTPCLIENT__GET, line 1367 of ./fcl-web/src/base/fphttpclient.pp
$004158BC TFPCUSTOMHTTPCLIENT__GET, line 1398 of ./fcl-web/src/base/fphttpclient.pp
$0040180A main, line 16 of project1.lpr
Heap dump by heaptrc unit
376 memory blocks allocated : 17237/18384
372 memory blocks freed : 17080/18216
4 unfreed memory blocks : 157
True heap size : 491520 (96 used in System startup)
True free heap : 490960
Should be : 491000
Call trace for block $01814660 size 64
$00409D6C fpc_raiseexception, line 165 of C:/dev/fpc/rtl/inc/except.inc
$004145B3 TFPCUSTOMHTTPCLIENT__READRESPONSE, line 1090 of ./fcl-web/src/base/fphttpclient.pp
$00414E75 TFPCUSTOMHTTPCLIENT__DONORMALREQUEST, line 1179 of ./fcl-web/src/base/fphttpclient.pp
$00415133 TFPCUSTOMHTTPCLIENT__DOMETHOD, line 1232 of ./fcl-web/src/base/fphttpclient.pp
$004156A9 TFPCUSTOMHTTPCLIENT__HTTPMETHOD, line 1331 of ./fcl-web/src/base/fphttpclient.pp
$00415867 TFPCUSTOMHTTPCLIENT__GET, line 1367 of ./fcl-web/src/base/fphttpclient.pp
$004158BC TFPCUSTOMHTTPCLIENT__GET, line 1398 of ./fcl-web/src/base/fphttpclient.pp
$0040180A main, line 16 of project1.lpr
Call trace for block $0174D9D8 size 24
$00409D6C fpc_raiseexception, line 165 of C:/dev/fpc/rtl/inc/except.inc
$004145B3 TFPCUSTOMHTTPCLIENT__READRESPONSE, line 1090 of ./fcl-web/src/base/fphttpclient.pp
$00414E75 TFPCUSTOMHTTPCLIENT__DONORMALREQUEST, line 1179 of ./fcl-web/src/base/fphttpclient.pp
$00415133 TFPCUSTOMHTTPCLIENT__DOMETHOD, line 1232 of ./fcl-web/src/base/fphttpclient.pp
$004156A9 TFPCUSTOMHTTPCLIENT__HTTPMETHOD, line 1331 of ./fcl-web/src/base/fphttpclient.pp
$00415867 TFPCUSTOMHTTPCLIENT__GET, line 1367 of ./fcl-web/src/base/fphttpclient.pp
$004158BC TFPCUSTOMHTTPCLIENT__GET, line 1398 of ./fcl-web/src/base/fphttpclient.pp
$0040180A main, line 16 of project1.lpr
Call trace for block $0178CA60 size 49
$0042434B FORMAT, line 403 of C:/dev/fpc/rtl/objpas/sysutils/sysformt.inc
$00424822 FORMAT, line 1066 of C:/dev/fpc/rtl/objpas/sysutils/sysstr.inc
$00427D9E EXCEPTION__CREATEFMT, line 190 of C:/dev/fpc/rtl/objpas/sysutils/sysutils.inc
$004145A7 TFPCUSTOMHTTPCLIENT__READRESPONSE, line 1090 of ./fcl-web/src/base/fphttpclient.pp
$00414E75 TFPCUSTOMHTTPCLIENT__DONORMALREQUEST, line 1179 of ./fcl-web/src/base/fphttpclient.pp
$00415133 TFPCUSTOMHTTPCLIENT__DOMETHOD, line 1232 of ./fcl-web/src/base/fphttpclient.pp
$004156A9 TFPCUSTOMHTTPCLIENT__HTTPMETHOD, line 1331 of ./fcl-web/src/base/fphttpclient.pp
$00415867 TFPCUSTOMHTTPCLIENT__GET, line 1367 of ./fcl-web/src/base/fphttpclient.pp
Call trace for block $0174D978 size 20
$004145A7 TFPCUSTOMHTTPCLIENT__READRESPONSE, line 1090 of ./fcl-web/src/base/fphttpclient.pp
$00414E75 TFPCUSTOMHTTPCLIENT__DONORMALREQUEST, line 1179 of ./fcl-web/src/base/fphttpclient.pp
$00415133 TFPCUSTOMHTTPCLIENT__DOMETHOD, line 1232 of ./fcl-web/src/base/fphttpclient.pp
$004156A9 TFPCUSTOMHTTPCLIENT__HTTPMETHOD, line 1331 of ./fcl-web/src/base/fphttpclient.pp
$00415867 TFPCUSTOMHTTPCLIENT__GET, line 1367 of ./fcl-web/src/base/fphttpclient.pp
$004158BC TFPCUSTOMHTTPCLIENT__GET, line 1398 of ./fcl-web/src/base/fphttpclient.pp
$0040180A main, line 16 of project1.lpr
$004158BC TFPCUSTOMHTTPCLIENT__GET, line 1398 of ./fcl-web/src/base/fphttpclient.pp