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:
henrike@webrtc.org
2011-10-06 18:14:25 +00:00
parent 1a2933c71a
commit bf54ef9bb7
2 changed files with 1 additions and 17 deletions

View File

@ -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)
{

View File

@ -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)