diff --git a/src/cas/generic/casChannelI.cc b/src/cas/generic/casChannelI.cc index 8070b3c34..f13d7cf7d 100644 --- a/src/cas/generic/casChannelI.cc +++ b/src/cas/generic/casChannelI.cc @@ -30,10 +30,10 @@ casChannelI::~casChannelI () { this->pv.destroyAllIO ( this->ioList ); + this->chan.destroy (); + // force PV delete if this is the last channel attached this->pv.deleteSignal (); - - this->chan.destroy (); } void casChannelI::uninstallFromPV ( casEventSys & eventSys )