View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0007281 | FPC | Compiler | public | 2006-08-18 22:10 | 2007-01-01 20:41 |
Reporter | Inoussa OUEDRAOGO | Assigned To | Florian | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Fixed in Version | 2.2.0 | ||||
Summary | 0007281: Memory leak with interfaces | ||||
Description | The attached progam demonstrates a interface memory leak which is not present in 2.0.2. The problem is also present in the 2.1.1 It seems that it occured when a interface is passed as procedure parameter like this : proc1(TTest.Create() as ITest); | ||||
Additional Information | 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] | ||||
Tags | No tags attached. | ||||
Fixed in Revision | 4998 | ||||
FPCOldBugId | |||||
FPCTarget | |||||
Attached Files |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2006-08-18 22:10 | Inoussa OUEDRAOGO | New Issue | |
2006-08-18 22:10 | Inoussa OUEDRAOGO | File Added: test_intf.pas | |
2006-10-22 10:13 | Florian | Relationship added | related to 0007209 |
2006-10-22 10:14 | Florian | Fixed in Revision | => 4998 |
2006-10-22 10:14 | Florian | Status | new => resolved |
2006-10-22 10:14 | Florian | Fixed in Version | => 2.1.1 |
2006-10-22 10:14 | Florian | Resolution | open => fixed |
2006-10-22 10:14 | Florian | Assigned To | => Florian |
2007-01-01 20:41 | Florian | Status | resolved => closed |