sim: Automatically unregister probe listeners
authorAndreas Sandberg <Andreas.Sandberg@ARM.com>
Tue, 9 Sep 2014 08:36:43 +0000 (04:36 -0400)
committerAndreas Sandberg <Andreas.Sandberg@ARM.com>
Tue, 9 Sep 2014 08:36:43 +0000 (04:36 -0400)
commit53a24b01ab93a35ccd6acc0ac9776b1a036b1d0e
treeaaba44a6e3e3574c9a59f3bc780aa8cf97c1e0b7
parentb0e4de667a7d0d51ac0667ce1e48f13b2cb17716
sim: Automatically unregister probe listeners

The ProbeListener base class automatically registers itself with a
probe manager. Currently, the class does not unregister a itself when
it is destroyed, which makes removing probes listeners somewhat
cumbersome. This patch adds an automatic call to
manager->removeListener in the ProbeListener destructor, which solves
the problem.
src/sim/probe/probe.cc
src/sim/probe/probe.hh