Solved

Creating & freeing question

Posted on 1999-01-04
1
129 Views
Last Modified: 2010-04-04
I am creating a panel at design time and then on that panel I am creating labels and edit boxes. All of the labels and edit boxes have the panel as a parent.

Anyway, my question is: when I come to close the form, I am calling Free for the panel but not for its child components. Is this OK or am I wasting the resources used by these components? Do I need to free each of them in turn or can I just free the panel and its children will be dealt with?
0
Comment
Question by:jsweby
1 Comment
 
LVL 20

Accepted Solution

by:
Madshi earned 50 total points
Comment Utility
Hi jsweby,

this is an extract from my help file. You'll find the same text in English if you type "free" in your delphi editor and press F1.
"Wenn Sie Free für eine Komponente aufrufen, werden alle untergeordneten Objekte (die Einträge in ihrer Komponentenliste) automatisch freigegeben."

In other words: All child components will be freed automatically; it's absolutely right to free only the parent component...   :-)

Regards, Madshi.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This video discusses moving either the default database or any database to a new volume.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

763 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

8 Experts available now in Live!

Get 1:1 Help Now