程序的退出部分内容为
FormClose
begin
CloseForm;
//此函数的功能是删除程序在注册表中留下的DLL信息,
//关闭注册信息(reg.closekey; reg.destroy;) 窗体.release;
action := cafree;
end;formdestroy
begin
窗体 := nil;
end;各位帮我再看看;
FormClose
begin
CloseForm;
//此函数的功能是删除程序在注册表中留下的DLL信息,
//关闭注册信息(reg.closekey; reg.destroy;) 窗体.release;
action := cafree;
end;formdestroy
begin
窗体 := nil;
end;各位帮我再看看;
begin
Application.Initialize;
Application.CreateForm(TMainForm, MainForm);
Application.Run;
end.然后在需要打开一个新子窗体的时候再创建,
Application.CreateForm(TF_PrintInfo, F_PrintInfo);
F_PrintInfo.SHOW;
子窗体关闭的时候用
action := cafree;
你试试是不是可以解决,我写的程序好像没有问题
窗体 := T窗体.Create(ParentForm);
try
窗体.Show;
retForm := 窗体;
except
窗体.Free;
end;
问题会出现在还有什么手动申请了的内存没有释放呢?已经找了一下午了。