TTreeView memory leak (WARNING: TResourceCacheItem.IncreaseRefCount 1000 TPenHandleCache)
Original Reporter info from Mantis: jakyro
-
Reporter name:
Original Reporter info from Mantis: jakyro
- Reporter name:
Description:
TreeView memory leak.
Create Win32/64 LCL application, add TreeView on MainForm, run and start resize MainForm until the message in console/log:
WARNING: TResourceCacheItem.IncreaseRefCount 1000 TPenHandleCache
WARNING: TResourceCacheItem.IncreaseRefCount 10000 TPenHandleCache
I tested it on Windows 10.0.10586 and 10.0.14393.
Steps to reproduce:
Windows 10.0.10586/10.0.14393
lazarus-1.6.0-fpc-3.0.0-win32/win64 2016-02-15
-
Create LCL graphical application "Menu/File/New.../Project/Application".
Create MainForm if not created. -
Create TreeView on MainForm and add TreeView items 1 or more.
-
Uncheck "Project Options.../Config and Target/Win32 gui application (-WG)" to see console messages OR run application with argument "--debug-log=log.txt".
-
Run application. Start resize MainForm (for repaint TreeView) from current size to zero and back, until the message (or close application to save log.txt if application running with --debug-log):
WARNING: TResourceCacheItem.IncreaseRefCount 1000 TPenHandleCache
WARNING: TResourceCacheItem.IncreaseRefCount 10000 TPenHandleCache
Additional information:
WARNING: TResourceCacheItem.IncreaseRefCount 1000 TPenHandleCache
WARNING: TResourceCacheItem.IncreaseRefCount 10000 TPenHandleCache
Mantis conversion info:
- Mantis ID: 30661
- OS: Windows
- OS Build: 10
- Build: 51630
- Version: 1.6
- Fixed in version: 1.9 (SVN)
- Fixed in revision: r55118 (#dd3f611b)
- Target version: 1.8