View Issue Details

IDProjectCategoryView StatusLast Update
0006148JEDI VCL00 JVCL Componentspublic2013-06-12 19:25
ReporterThorAssigned ToAHUser 
Status resolvedResolutionfixed 
Product VersionDaily / GIT 
Target VersionFixed in Version 
Summary0006148: Memory Leak on JvSegmentedLEDDisplay
The only inclusion of this unit in the "uses" list of a "unit form" it's sufficient for having a memory leak !

This application has leaked memory. The small block leaks are (excluding expected leaks registered by pointer):

13 - 20 bytes: TIntConst x 1
--------------------------------2013/6/11 11:26:11--------------------------------
A memory block has been leaked. The size is: 20

This block was allocated by thread 0x189C, and the stack trace (return addresses) at the time was:
402B17 [System][@GetMem]
427B71 [Classes][TStrings.SetStringsAdapter]
404D10 [System][InitUnits]
404D77 [System][@StartExe]
759633AA [BaseThreadInitThunk]
77AD9EF2 [Unknown function at RtlInitializeExceptionChain]
77AD9EC5 [Unknown function at RtlInitializeExceptionChain]

The block is currently used for an object of class: TIntConst

The allocation number is: 1459
Additional InformationSimple test :
1) Create a new project and put a TJvSegmentedLEDDisplay on the form1.
Run it, close the app and you have the memory leak.
2) Remove the component TJvSegmentedLEDDisplay (don't remove the uses).
Run it, close the app and you have the memory leak without the component !!
3) remove from the "uses" JvSegmentedLEDDisplay
Run it, close the app all good
TagsNo tags attached.



2013-06-12 19:25

developer   ~0020526

This is a Delphi RTL bug that was fixed in XE2.

If the Color-Int is unregister by calling Classes.UnregisterIntegerConsts then memory leaks. If it is not unregistered then the Classes.FreeIntConstList function will release the memory when the application terminates. But not unregistering the Color-Int from JvSegmentedLEDDisplay would mean that the JVCL's runtime package (and so the IDE) become instable if the JVCL package is unloaded.

Issue History

Date Modified Username Field Change
2013-06-11 11:28 Thor New Issue
2013-06-12 19:25 AHUser Note Added: 0020526
2013-06-12 19:25 AHUser Status new => resolved
2013-06-12 19:25 AHUser Resolution open => fixed
2013-06-12 19:25 AHUser Assigned To => AHUser