我有类型
NotifyReplylist:= TNotifyReplylist.Create(self,TNotifyReply);
调用此函数(任意次数)后,将其计数为零
function TNotifyReplylist.addItem: TNotifyReply;
begin
Result := inherited Add as TNotifyReply;
OutputDebugString(PAnsiChar('Count > '+ inttostr(count)));
end;
有什么想法在这里发生?
答案 0 :(得分:4)
发现问题,TNotifyReply.Create是
constructor TNotifyReply.Create(ACollection: TCollection);
begin
inherited Create(Collection);
....
更改为
inherited Create(ACollection);