Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2005.11.20;
Скачать: CL | DM;

Вниз

Нужно ли вызывать 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;
Скачать: CL | DM;

Наверх




Память: 0.48 MB
Время: 0.055 c
2-1131047306
Eksell
2005-11-03 22:48
2005.11.20
Kak v Console ochisteti ekran?


1-1130527472
Arazel
2005-10-28 23:24
2005.11.20
TabControl > TabsScroll (CUSTOMDRAW)


1-1130336571
Суслик
2005-10-26 18:22
2005.11.20
Вопрос про mouseUp


5-1110291542
Sphinx
2005-03-08 17:19
2005.11.20
Можно ли опубликовать в наследнике функцию ?


1-1130404644
Walker
2005-10-27 13:17
2005.11.20
Интерфейс: построитель выражений