Solved

Delphi1: StringGrid Memleak

Posted on 1998-05-06
3
402 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

867 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

23 Experts available now in Live!

Get 1:1 Help Now