Have been working on my custom stringgrid.
Working on memory, and memory use and leaks.
I have just realized that adding components like buttons and images is not a good idea. It takes way too much memory.
I have to re-do this, and draw the stuff instead of using components. Just drav on the canvas. And remove all components I have used for the cells in the grid. And just check if user clicks on the region I drawed the items instead.
Seems like the only solution to keep the grid not go way high in memory use.