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

Вниз

Удаление компонента   Найти похожие ветки 

 
Night $kull   (2003-03-06 18:12) [0]

Народ!!! Подскажите пожалста каким способом лучша удалить компонет Destroy или Free??? И если можно то объясните что каждый этот метод делает! :(
Заранее спасибо....


 
Palladin   (2003-03-06 18:16) [1]

procedure Free;

Description

Use Free to destroy an object. Free automatically calls the destructor if the object reference is not nil. Any object instantiated at runtime that does not have an owner should be destroyed by a call to Free so that it can be properly disposed of and its memory released. Unlike Destroy, Free is successful even if the object is nil; so if the object was never initialized, Free won’t result in an error.

When you call Free for a component, it calls Free for all components that it owns—that is, all components in its component list. Since a form owns all the controls and nonvisual components that are created on it in design mode, those components are automatically freed when the form is freed. By default, all forms are owned by the Application object; when the application terminates, it frees the Application object, which frees all forms. For objects that are not components, or for components created with a nil owner, be sure to call Free after you are finished with them; otherwise the allocated memory will not be usable until after the application terminates.

Warning: Never explicitly free a component within one of its own event handlers or the event handler of a component it owns or contains. For example, don’t free a button, or the form that owns the button, in its OnClick event handler.

To free a form, call its Release method, which destroys the form and releases the memory allocated for it after all its event handlers and those of the components it contains are through executing.


 
Night $kull   (2003-03-06 18:23) [2]

Thank you so much!!!



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

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

Наверх




Память: 0.44 MB
Время: 0.008 c
1-54045
Frog
2003-03-05 06:37
2003.03.17
Аудио поток в real-time


1-54040
Спрашивающий
2003-03-04 01:26
2003.03.17
Повторю вопрпос:Взаимодействие OpenDialog и функции DiskFree(0)


7-54322
Evg12
2003-01-18 13:39
2003.03.17
Уважаемые мастера, Как узнать серийный номер и/или тип материнско


7-54337
Selesty
2003-01-20 11:04
2003.03.17
EIP


1-54010
Андрусь
2003-03-05 18:08
2003.03.17
Как получить из такой строки YYYY_MM_DD_HN дату





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
Английский Французский Немецкий Итальянский Португальский Русский Испанский