Memoryleak of TGirdDropTarget

Atter ending my application which uses a TAdvStringGrid i get a memoryleak message from FastMM (see blow). Is this a bug?


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

13 - 20 bytes: Unknown x 1
21 - 36 bytes: TGridDropTarget x 6

Note: Memory leak detail is logged to a text file in the same folder as this application. To disable this memory leak check, undefine "EnableMemoryLeakReporting".

--------------------------------2016/9/16 14:25:17--------------------------------
A memory block has been leaked. The size is: 36

This block was allocated by thread 0x7E3C, and the stack trace (return addresses) at the time was:
406BA6 
409EE3 
40FF95 
40A5FA 
D71A52 [AdvGrid.pas][AdvGrid][AdvGrid.TGridDropTarget.Create][58493]
558B3A [Vcl.Controls.pas][Vcl][Vcl.Controls.TControl.UpdateAnchorRules][5659]
D79BC0 [AdvGrid.pas][AdvGrid][AdvGrid.TDragDropSettings.SetOleDropTarget][61807]
CF4F91 [AdvGrid.pas][AdvGrid][AdvGrid.TAdvStringGrid.CreateHandle][13034]
5629CA [Vcl.Controls.pas][Vcl][Vcl.Controls.TWinControl.HandleNeeded][12088]
5629D6 [Vcl.Controls.pas][Vcl][Vcl.Controls.TWinControl.GetHandle][12094]
D79BEB [AdvGrid.pas][AdvGrid][AdvGrid.TDragDropSettings.SetOleDropTarget][61808]

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

Your question was a lready answered by email on Friday 16/9:


"Do you use the latest version of the grid? <o:p></o:p>

I have retested this here but couldn't reproduce a memory leak.

If you use the latest version of the grid, what specific settings do you have and/or what specific operations do you do with the grid?"


Is it possible to share the result of this question?
We have a similar message in Fast4MM:

--------------------------------2024/6/6 10:36:18--------------------------------
A memory block has been leaked. The size is: 56

The block is currently used for an object of class: AdvGrid.TGridDropTarget

The allocation number is: 14142219

Current memory dump of 256 bytes starting at pointer address 7FF4C5A390F0:
58 EF 59 01 00 00 00 00 00 00 00 00 00 00 00 00 78 37 E2 00 00 00 00 00 00 00 01 01 00 01 00 00
30 7A 4D 01 00 00 00 00 10 01 A5 DD F4 7F 00 00 00 00 00 00 00 00 00 00 8F E7 71 38 C8 8A 27 FF
00 00 00 00 00 00 00 00 41 96 A3 C5 F4 7F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 99 82 5D 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 38 2A 00 00 38 2A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
X ï Y . . . . . . . . . . . . . x 7 â . . . . . . . . . . . . .
0 z M . . . . . . . ¥ Ý ô  . . . . . . . . . .  ç q 8 È Š ' ÿ
. . . . . . . . A – £ Å ô  . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . ™ ‚ ] . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . 8 * . . 8 * . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

--------------------------------2024/6/6 10:36:18--------------------------------
This application has leaked memory. The small block leaks are (excluding expected leaks registered by pointer):

41 - 56 bytes: AdvGrid.TGridDropTarget x 1

Exporterd grid configuration:
GridConfig.txt (4.1 KB)

I have no idea in what format this gridconfig.txt file is. Can you please send a source project + steps to reproduce and confirm you use the latest version of TMS VCL UI Pack.

Hello Bruno,

I created a small testproject:
//If scrolltype = ssFlat, memory leak TGridDropTarget

We use latest version, gridconfig.txt was created by the option of TAdvStringgrid in UI.

Error_TGridDropTarget.zip (74.5 KB)

Thanks for these details.
It helped us to trace & solve this rare issue.
The next update will address this.