Removed code under a non-existing define.
Review URL: http://webrtc-codereview.appspot.com/193006 git-svn-id: http://webrtc.googlecode.com/svn/trunk@706 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -44,9 +44,7 @@
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#ifndef WEBRTC_NO_AUTO_PTR // are we allowed to use auto_ptrs?
|
||||
#include <memory> // definition of auto_ptr
|
||||
#endif
|
||||
#include <memory> // 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<CriticalSectionWrapper> crtiSect = std::auto_ptr<CriticalSectionWrapper>(CriticalSectionWrapper::CreateCriticalSection());
|
||||
CriticalSectionScoped lock(*crtiSect);
|
||||
#endif
|
||||
|
||||
if(inc == kSsrcDbInc)
|
||||
{
|
||||
|
||||
@ -21,10 +21,8 @@
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32
|
||||
#ifndef WEBRTC_NO_AUTO_PTR
|
||||
#include <memory>
|
||||
#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<CriticalSectionWrapper> crtiSect =
|
||||
std::auto_ptr<CriticalSectionWrapper>(
|
||||
CriticalSectionWrapper::CreateCriticalSection());
|
||||
#endif
|
||||
CriticalSectionScoped lock(*crtiSect);
|
||||
|
||||
if(inc == kUdpSocketManagerInc)
|
||||
|
||||
Reference in New Issue
Block a user