diff --git a/src/modules/rtp_rtcp/source/ssrc_database.cc b/src/modules/rtp_rtcp/source/ssrc_database.cc index e69e5d869f..4db32eeaf7 100644 --- a/src/modules/rtp_rtcp/source/ssrc_database.cc +++ b/src/modules/rtp_rtcp/source/ssrc_database.cc @@ -44,9 +44,7 @@ #include #include #include - #ifndef WEBRTC_NO_AUTO_PTR // are we allowed to use auto_ptrs? - #include // definition of auto_ptr - #endif + #include // definition of auto_ptr #endif namespace webrtc { @@ -60,14 +58,8 @@ SSRCDatabase::StaticInstance(SsrcDatabaseCount inc) SsrcDatabaseCreate state = kSsrcDbExist; #ifndef _WIN32 -#ifdef WEBRTC_NO_AUTO_PTR - // since we only have InterlockedExchange on windows and no auto_ptrs, this will result in a memory leak but we accept it for now - static CriticalSectionWrapper* crtiSect(CriticalSectionWrapper::CreateCriticalSection()); - CriticalSectionScoped lock(*crtiSect); -#else static std::auto_ptr crtiSect = std::auto_ptr(CriticalSectionWrapper::CreateCriticalSection()); CriticalSectionScoped lock(*crtiSect); -#endif if(inc == kSsrcDbInc) { diff --git a/src/modules/udp_transport/source/udp_socket_manager_wrapper.cc b/src/modules/udp_transport/source/udp_socket_manager_wrapper.cc index 4157a2ef95..2800797ea8 100644 --- a/src/modules/udp_transport/source/udp_socket_manager_wrapper.cc +++ b/src/modules/udp_transport/source/udp_socket_manager_wrapper.cc @@ -21,10 +21,8 @@ #endif #ifndef _WIN32 -#ifndef WEBRTC_NO_AUTO_PTR #include #endif -#endif namespace webrtc { UdpSocketManager* UdpSocketManager::CreateSocketManager( @@ -61,15 +59,9 @@ UdpSocketManager* UdpSocketManager::StaticInstance( #ifndef _WIN32 -#ifdef WEBRTC_NO_AUTO_PTR - // TODO (pwestin): crtiSect is never reclaimed. Fix memory leak. - static CriticalSectionWrapper* crtiSect( - CriticalSectionWrapper::CreateCriticalSection()); -#else static std::auto_ptr crtiSect = std::auto_ptr( CriticalSectionWrapper::CreateCriticalSection()); -#endif CriticalSectionScoped lock(*crtiSect); if(inc == kUdpSocketManagerInc)