[Xorp-hackers] TimerList destructor leaking memory?

Pavlin Radoslavov pavlin at icir.org
Fri Oct 12 19:00:22 PDT 2007


Ben Greear <greearb at candelatech.com> wrote:

> Pavlin Radoslavov wrote:
> > Ben Greear <greearb at candelatech.com> wrote:
> > 
> >> It seems that the TimerList object (timer.cc)
> >> doesn't delete the members in it's _heaplist
> >> in the destructor.
> >>
> >> Are these supposed to be cleaned up somewhere else?
> > 
> > I think you are right, it seems the Heap objects on the _heaplist
> > are not deleted when TimerList destructor is invoked.
> > The Heap objects are alocated only inside TimerList::find_heap() and
> > the _heaplist management/access is internal to TimerList only, so
> > the TimerList destructor should delete the leftover.
> > 
> > The fix for that will be trivial, but lets address it after the
> > pending two xorpsh related patches are out of the way.
> 
> I thought it would be trivial too, but ran into wierd problems.  Hopefully
> it's some other mistake I added in my code...will re-sync with your tree
> when you commit the changes.

Interesting.

Anyway, I committed all outstanding changes + the extra patch
from you (received off-list), so lets sync with HEAD before
investigating the _heaplist issue.

Thanks,
Pavlin



More information about the Xorp-hackers mailing list