better fix for port destruction
This commit is contained in:
parent
09b51f3901
commit
ec9784764c
|
@ -41,7 +41,7 @@ BackendPort::BackendPort (PortEngineSharedImpl &b, const std::string& name, Port
|
|||
BackendPort::~BackendPort ()
|
||||
{
|
||||
assert (_connections.empty());
|
||||
std::cerr << "Backendport @ " << this << " being deleted\n";
|
||||
std::cerr << "Backendport " << _name << " @ " << this << " being deleted\n";
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -366,6 +366,9 @@ PortEngineSharedImpl::unregister_port (PortEngine::PortHandle port_handle)
|
|||
pm->erase (port->name());
|
||||
ps->erase (i);
|
||||
}
|
||||
|
||||
_ports.flush ();
|
||||
_portmap.flush ();
|
||||
}
|
||||
|
||||
|
||||
|
@ -377,6 +380,7 @@ PortEngineSharedImpl::unregister_ports (bool system_only)
|
|||
_system_midi_in.clear();
|
||||
_system_midi_out.clear();
|
||||
|
||||
{
|
||||
RCUWriter<PortIndex> index_writer (_ports);
|
||||
RCUWriter<PortMap> map_writer (_portmap);
|
||||
|
||||
|
@ -393,11 +397,16 @@ PortEngineSharedImpl::unregister_ports (bool system_only)
|
|||
ps->erase (cur);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_ports.flush ();
|
||||
_portmap.flush ();
|
||||
}
|
||||
|
||||
void
|
||||
PortEngineSharedImpl::clear_ports ()
|
||||
{
|
||||
{
|
||||
RCUWriter<PortIndex> index_writer (_ports);
|
||||
RCUWriter<PortMap> map_writer (_portmap);
|
||||
|
||||
|
@ -413,6 +422,11 @@ PortEngineSharedImpl::clear_ports ()
|
|||
ps->clear();
|
||||
pm->clear();
|
||||
}
|
||||
}
|
||||
|
||||
_ports.flush ();
|
||||
_portmap.flush ();
|
||||
|
||||
}
|
||||
|
||||
uint32_t
|
||||
|
|
Loading…
Reference in New Issue
Block a user