Solved

Delphi1: StringGrid Memleak

Posted on 1998-05-06
3
401 Views
Last Modified: 2010-04-06
When i change the ColWidths of a StringGrid in delphi 1 i got some memoryleaks? Is there a patch for this or how can i avoid the memleaks?
ex: StringGrid1.ColWidths[1]:= 100
0
Comment
Question by:ponti
  • 2
3 Comments
 
LVL 5

Accepted Solution

by:
inter earned 100 total points
Comment Utility
Hi
Actually it is not a a memory leak, When you do not assign the colwidth property, Delphi does not allocate anything to it. It just uses the DefaultColWidth to determine the width of columns when drawing. But when you assign something to colwidths it uses Realloc function to allocate and integer array for the widths of the columns. So no need to worry (As far as I know, may someone know about this more)You may ask where do I know? I have just look at the VCL source code for the grids.pas.
Regards,
Igor
0
 

Author Comment

by:ponti
Comment Utility
But why does the memory monitor for delphi 1 shows a leak when assigning a new value to the colwidths property?
0
 
LVL 5

Expert Comment

by:inter
Comment Utility
Dear ponti,
Do you have a source code for grids.pas for delphi1.0? If so send it to me and I check for you (Also there is a bug in system.pas in delphi 1 in memory allocation, do you have the updates for delphi that fixes the problem. In this case all mem allocations may resource have resource leaks.) Inany case here is my email
inter@kosgeb.tekmer.gov.tr
Regards,Igor
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now