BlockingUDPTransport wrap close() to break ref. loop

This commit is contained in:
Michael Davidsaver
2017-06-02 12:32:12 +02:00
parent 11cc395baf
commit 6fcfd60bd5
3 changed files with 26 additions and 1 deletions

View File

@@ -263,6 +263,7 @@ void ServerContextImpl::initialize()
_timer.reset(new Timer("pvAccess-server timer", lowerPriority));
ServerContextImpl::shared_pointer thisServerContext = shared_from_this();
// we create reference cycles here which are broken by our shutdown() method,
_responseHandler.reset(new ServerResponseHandler(thisServerContext));
_acceptor.reset(new BlockingTCPAcceptor(thisServerContext, _responseHandler, _ifaceAddr, _receiveBufferSize));