[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ns] does it work corrretly?



> Agent::~Agent()
> {
>          if (oldValueList_ != NULL) {
>                   OldValue *p;            // dynamic variable, not initialized
>                   while (oldValueList_ != NULL) {
>                        oldValueList_ = oldValueList_->next_;
>                        delete p;            // does it work for the first element??????
>                        p = oldValueList_;
>                   }
>          }
> }

This was my code and yes it is a bug. Must have slipped since it's so rare
that an agent got deleted and it's even much rarer that an agent has a
nam-traced variable...

- Haobo