Hi The attached progam demonstrates a memory leak which is not present in 2.0.2
1- When the program is compiled with 2.0.2, the results are : [listing 2.0.2] Creating >>> 544436 called in test Creating >>> 544468 called in proc1 Destroying >>> 544468 Destroying >>> 544436 Remaining instances ... 0 [/listing 2.0.2] 1- When the program is compiled with 2.0.2, the results are : [listing 2.0.2] Creating >>> 544436 called in test Creating >>> 544468 called in proc1 Destroying >>> 544468 Destroying >>> 544436 Remaining instances ... 0 [/listing 2.0.2] 2- When the program is compiled with 2.0.4.rc3, the results are : [listing 2.0.4.rc3] Creating >>> 675784 called in test Creating >>> 676072 called in proc1 Destroying >>> 676072 Remaining instances ... 1 [/listing 2.0.4.rc3] and the "HeapTrc" unit output are [HeapTrc] E:\Inoussa\Sources\lazarus\tests\interfaces\test_intf.exe Heap dump by heaptrc unit 53 memory blocks allocated : 987/1192 52 memory blocks freed : 971/1176 1 unfreed memory blocks : 16 True heap size : 196608 (208 used in System startup) True free heap : 196304 Should be : 196328 Call trace for block $000A4FC8 size 16 $00402608 TOBJECT__NEWINSTANCE, line 177 of C:/lazarus/source/fpcbuild/2.0.4-rc3/fpcsrc/rtl/inc/objpas.inc $00401B3E TINTERFACEDOBJECT__NEWINSTANCE, line 705 of C:/lazarus/source/fpcbuild/2.0.4-rc3/fpcsrc/rtl/inc/objpas.inc $004010CA TTEST__CREATE, line 33 of test_intf.pas $004012C0 TEST, line 53 of test_intf.pas $0040133F main, line 58 of test_intf.pas $004013EE EXE_ENTRY, line 420 of system.pp [/HeapTrc]
test_intf.pas
Description: Binary data
_______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel