Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Начинающим";
Текущий архив: 2005.11.20;
Скачать: [xml.tar.bz2];

Вниз

Нужно ли вызывать Free   Найти похожие ветки 

 
DelphiLexx ©   (2005-10-28 19:44) [0]

У меня есть control№1 на нем control№2 т.е. control№2.parent = control№1.
Вопрос:
Я вызываю control№1.Free нужно ли перед этим вызывать control№2.Free.


 
Reindeer Moss Eater ©   (2005-10-28 19:52) [1]

нужно ли кому?
нужно ли чему?


 
tesseract ©   (2005-10-28 20:09) [2]


> Я вызываю control№1.Free нужно ли перед этим вызывать control№2.
> Free.


Если компоненты созданы динамически то нужно. И лучше не Free а FreeAndNil.

Автовызов Free в принципе должен вызываться только если control2.Owner=control1.


 
DelphiLexx ©   (2005-10-28 20:10) [3]


> нужно ли кому?

Мне в программном коде.
Вообще мне кажется вопрос понятен.


 
begin...end ©   (2005-10-28 20:20) [4]

> DelphiLexx ©   (28.10.05 19:44)
> tesseract ©   (28.10.05 20:09) [2]

The Parent property declared in TControl is similar to the Owner property declared in TComponent, in that the Parent of a control frees the control just as the Owner of a component frees that Component.


 
Джо ©   (2005-10-28 20:22) [5]

Из Справки по TControl.Parent:

The Parent property declared in TControl is similar to the Owner property declared in TComponent, in that the Parent of a control frees the control just as the Owner of a component frees that Component.


 
Джо ©   (2005-10-28 20:22) [6]


>  [4] begin...end ©   (28.10.05 20:20)

Ну надо же :-)


 
tesseract ©   (2005-10-28 20:48) [7]

> to begin..end

Судя по  всему зависит от версии Delphi



Страницы: 1 вся ветка

Форум: "Начинающим";
Текущий архив: 2005.11.20;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.46 MB
Время: 0.037 c
6-1123645641
Big Joe
2005-08-10 07:47
2005.11.20
Помогите с сокетом


14-1130496133
Ling
2005-10-28 14:42
2005.11.20
НЕПОРЯДОК!!


2-1130622900
Grol
2005-10-30 01:55
2005.11.20
Вопрос про Stringgrid


14-1130316893
ZeRaM
2005-10-26 12:54
2005.11.20
Нужен компонент


2-1130922988
BanderLog
2005-11-02 12:16
2005.11.20
Пауза в приложении.





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский