BIND 10 #394: memory leaks in branches/trac327 (after io_service refactors)
BIND 10 Development
do-not-reply at isc.org
Wed Oct 27 14:49:26 UTC 2010
#394: memory leaks in branches/trac327 (after io_service refactors)
-------------------------------+--------------------------------------------
Reporter: jelte | Owner:
Type: defect | Status: new
Priority: major | Milestone:
Component: Unclassified | Resolution:
Keywords: | Sensitive: 0
Estimatedhours: 0.0 | Hours: 0
Billable: 1 | Totalhours: 0
Internal: 0 |
-------------------------------+--------------------------------------------
Comment(by each):
The peer/iosock issue is because of the code being left in an intermediate
state. Originally, peer and iosock were both shared_ptr<>'s and both
members of the TCPServer and UDPServer classes, so they were deleted when
the server instance was deleted. I moved them into the operator()
function while I was experimenting with changing the way IOMessage is
constructed, ran into a roadblock, and reverted most of the change, but
apparently I left this bit wrong.
Anyway, this ought to fix it:
peer.reset(new TCPEndpoint(socket_->remote_endpoint()));
iosock.reset(new TCPSocket(*socket_));
My guess is you can fix the UDPQuery leak by calling "delete server_;" in
a ~UDPQuery() destructor, oops.
--
Ticket URL: <http://bind10.isc.org/ticket/394#comment:3>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list