In fact, even if I just open the IDE and close it immediately, I see a memory leak:
S:\laz\lazarus.exe
Heap dump by heaptrc unit of S:\laz\lazarus.exe
1632079 memory blocks allocated : 389891709/394409296
1632076 memory blocks freed : 389891641/394409216
3 unfreed memory blocks : 68
True heap size : 2654208 (80 used in System startup)
True free heap : 2653712
Should be : 2653760
Call trace for block $161F25E8 size 28
$0136C4D7 Create, line 253 of Core/IdThreadSafe.pas
$0136DC75 $IDTHREAD_$$_init$, line 785 of Core/IdThread.pas
$00412304
Call trace for block $1621DBB0 size 12
$0136DC75 $IDTHREAD_$$_init$, line 785 of Core/IdThread.pas
$00412304
Call trace for block $161F24C8 size 28
$012C0C4C $IDSTACK_$$_init$, line 1242 of System/IdStack.pas
$00412304