Solved

Delphi1: StringGrid Memleak

Posted on 1998-05-06
3
412 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 5

Accepted Solution

by:
inter earned 100 total points
ID: 1342035
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
ID: 1342036
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
ID: 1342037
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Firemonkey webbrowser scrollbars ? 1 69
Firemonkey DbLookupComboBox equivalent ? 2 77
Graphics32 under Delphi 10.1 Berlin 2 175
Broadcast a message using ICS 2 50
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

734 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