S stargazer Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-16 #4 窗体Release时先发送一个消息给系统,然后才Free,因此OnClose等事件有机会在Free之前执行。
Q qianwt Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-16 #6 用Free的时候,窗体为空不会出现异常 用Release的时候,窗体为空会出现异常
M myangel Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-20 #7 1.Release发送消息来释放窗体和所占的内存。见定义 procedure TCustomForm.Release; begin PostMessage(Handle, CM_RELEASE, 0, 0); end; 提倡用Release代替Free 2。Free procedure TObject.Free; begin if Self <> nil then Destroy; end;
1.Release发送消息来释放窗体和所占的内存。见定义 procedure TCustomForm.Release; begin PostMessage(Handle, CM_RELEASE, 0, 0); end; 提倡用Release代替Free 2。Free procedure TObject.Free; begin if Self <> nil then Destroy; end;