DELPHI盒子
!实时搜索: 盒子论坛 | 注册用户 | 修改信息 | 退出
检举帖 | 全文检索 | 关闭广告 | 捐赠
技术论坛
 用户名
 密  码
自动登陆(30天有效)
忘了密码
≡技术区≡
DELPHI技术
lazarus/fpc/Free Pascal
移动应用开发
Web应用开发
数据库专区
报表专区
网络通讯
开源项目
论坛精华贴
≡发布区≡
发布代码
发布控件
文档资料
经典工具
≡事务区≡
网站意见
盒子之家
招聘应聘
信息交换
论坛信息
最新加入: jsuguo
今日帖子: 28
在线用户: 14
导航: 论坛 -> DELPHI技术 斑竹:liumazi,sephil  
作者:
男 tiez (骑牛夜旅) ★☆☆☆☆ -
普通会员
2016/7/22 10:31:55
标题:
提交到Remobjects的bug有回应了 浏览:1403
加入我的收藏
楼主: DA使用command的方式操作数据时,有一个参数组不自动释放导致的内存泄漏的BUG,上周日提交到Remobjects Talk后,官方将这个BUG收录了,并在很短时间内解决了这个问题。
问题的表现是这样的:
project: %DAPath%\RemObjects Samples\Data Abstract for Delphi\Commands.dpr
unit: fClientDataModule.pas
lines: 101-125

function TClientDataModule.UpdateClient(aClientID: integer; aClientName: string;
aClientDiscount: double; aClientEmail, aClientPassword: string;
aClientBirthdate: DateTime; aClientPhone, aClientPostalCode, aClientAddress,
aClientNotes: string): Boolean;
var
ldp: DataParameterArray;
lp: DataParameter;
begin
ldp := DataParameterArray.Create;
try
lp := ldp.Add; lp.Name := UTF8Encode('ClientName');lp.Value := aClientName;
lp := ldp.Add; lp.Name := UTF8Encode('ClientDiscount');lp.Value := aClientDiscount;
lp := ldp.Add; lp.Name := UTF8Encode('ClientEmail');lp.Value := aClientEmail;
lp := ldp.Add; lp.Name := UTF8Encode('ClientPassword');lp.Value := aClientPassword;
lp := ldp.Add; lp.Name := UTF8Encode('ClientBirthdate');lp.Value := aClientBirthdate;
lp := ldp.Add; lp.Name := UTF8Encode('ClientPhone');lp.Value := aClientPhone;
lp := ldp.Add; lp.Name := UTF8Encode('ClientPostalCode');lp.Value := aClientPostalCode;
lp := ldp.Add; lp.Name := UTF8Encode('ClientAddress');lp.Value := aClientAddress;
lp := ldp.Add; lp.Name := UTF8Encode('ClientNotes');lp.Value := aClientNotes;
lp := ldp.Add; lp.Name := UTF8Encode('OLD_ClientID');lp.Value := aClientID;
Result := RemoteCommand.Execute('Clients_UPDATE',ldp) > 0;
finally
ldp.Free;
end;
end;
官方的回复是这样的:
Thanks, logged as bugs://75697
bugs://75697 got closed with status fixed.
大家临时先用以下方法解决:
update uRODynamicRequest.pas as
procedure TRODynamicRequest.DoReadParams(aMessage: IROMessage; aParams: TRORequestParamCollection);

  procedure _ReadParam(aParam: TRORequestParam);
...
          aParam.AsComplexType := vobj;
          aParam.OwnsComplexType:=True;  // added
...
如果你们是测试版用户,那么可能没有DA的源代码,那么请按以下方法使用也可绕过这个问题:
    Result := RemoteCommand.Execute('Clients_UPDATE',ldp) > 0;
    RemoteCommand.ExecuteCall.ParamByName(RemoteCommand.ExecuteCall.IncomingParametersParameter).OwnsComplexType := true; //<<<<
----------------------------------------------
-
作者:
男 wang_80919 (Flying Wang) ★☆☆☆☆ -
普通会员
2016/7/22 11:44:09
1楼: 好贴要顶。
----------------------------------------------
(C)(P)Flying Wang
作者:
男 bigboy2050 (bigboy2050) ★☆☆☆☆ -
普通会员
2016/7/30 15:41:14
2楼: DA 很厉害!
----------------------------------------------
kittyapp
作者:
男 lzd123 (昨夜清风) ★☆☆☆☆ -
盒子活跃会员
2016/7/30 17:41:19
3楼: 很好,LZ辛苦!
----------------------------------------------
向你学习
信息
登陆以后才能回复
Copyright © 2CCC.Com 盒子论坛 v3.0.1 版权所有 页面执行58.59375毫秒 RSS