Memory leak fix: Deleting a factory

Also expanded some documentation.
Bug found by Valgrind bot.

BUG=
TEST=

Review URL: https://webrtc-codereview.appspot.com/507002

git-svn-id: http://webrtc.googlecode.com/svn/trunk@2080 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
hta@webrtc.org 2012-04-20 09:51:26 +00:00
parent bcde776340
commit bbd6b561cf
2 changed files with 4 additions and 2 deletions

View File

@ -169,8 +169,9 @@ UdpTransportImpl::~UdpTransportImpl()
delete _critFilter;
delete _critPacketCallback;
delete _cachLock;
delete _socket_creator;
UdpSocketManager::Return();
WEBRTC_TRACE(kTraceMemory, kTraceTransport, _id, "%s deleted",
__FUNCTION__);
}

View File

@ -34,7 +34,8 @@ public:
};
// Constructor, only called by UdpTransport::Create and tests.
// The constructor takes ownership of the factory.
// The constructor takes ownership of the "maker",
// and will call Return on the socket_manager at exit.
UdpTransportImpl(const WebRtc_Word32 id,
SocketFactoryInterface* maker,
UdpSocketManager* socket_manager);