TRegistry 释放内存错误
procedure TForm1.Button1Click(Sender: TObject);var
reg:TRegistry;
begin
reg:= reg.Create ;
reg.RootKey:=HKEY_CURRENT_USER ;
if reg.OpenKey('\Software',True) then
reg.WriteString('222','111');
reg.CloseKey ;
reg.Free; //这里为什么会出错
end;
end.