找出index/pos位置 |
答題得分者是:yachanga
|
BorlandUser
中階會員 發表:148 回覆:217 積分:73 註冊:2004-02-19 發送簡訊給我 |
|
yachanga
資深會員 發表:24 回覆:335 積分:296 註冊:2003-09-27 發送簡訊給我 |
|
BorlandUser
中階會員 發表:148 回覆:217 積分:73 註冊:2004-02-19 發送簡訊給我 |
|
BorlandUser
中階會員 發表:148 回覆:217 積分:73 註冊:2004-02-19 發送簡訊給我 |
|
yachanga
資深會員 發表:24 回覆:335 積分:296 註冊:2003-09-27 發送簡訊給我 |
|
BorlandUser
中階會員 發表:148 回覆:217 積分:73 註冊:2004-02-19 發送簡訊給我 |
|
BorlandUser
中階會員 發表:148 回覆:217 積分:73 註冊:2004-02-19 發送簡訊給我 |
|
yachanga
資深會員 發表:24 回覆:335 積分:296 註冊:2003-09-27 發送簡訊給我 |
引言: 因為不想開新topic,請原諒,我想問fee和release有咩分別架?您是想問free 和 release 有何不同嗎? 小弟也不是挺清楚, 提供資料給您參考 (1) Release (Delphi Help TCustomForm.Release) procedure TCustomForm.Release; begin PostMessage(Handle, CM_RELEASE, 0, 0); end;Destroys the form and frees its associated memory. Use Release to destroy the form and free its associated memory. Release does not destroy the form until all event handlers of the form and event handlers of components on the form have finished executing. Release also guarantees that all messages in the form's event queue are processed before the form is released. Any event handlers of the form should use Release instead of Free. Failing to do so could lead to an access violation. (2) Free (Delphi Help TObject.Free) destructor TObject.Destroy; begin end; procedure TObject.Free; begin if Self <> nil then Destroy; end;Destroys an object and frees its associated memory, if necessary. 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急 result in an error. When you call Free for a component, it calls Free for all components that it owns? hat 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, ll 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. 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. ~悠遊法國號~ |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |