Skip to content

Commit b99aa75

Browse files
committed
Don't use std_vector for static vectors.
Some implementations of std::vector do dumb stuff and the default constructor actually allocates memory. (Uggggggg.) This causes problems if an app wants to set a custom memory allocator, because by the time they do that these vectors will have already allocated memory, and then if that memory needs to be reallocated, by the custom allocator, we run into problems. This fixes #209 P4:7032464
1 parent 7b1fbfb commit b99aa75

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/steamnetworkingsockets/clientlib/steamnetworkingsockets_connections.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ CSteamNetworkConnectionBase::~CSteamNetworkConnectionBase()
632632
}
633633
}
634634

635-
static std_vector<CSteamNetworkConnectionBase *> s_vecPendingDeleteConnections;
635+
static std::vector<CSteamNetworkConnectionBase *> s_vecPendingDeleteConnections;
636636
static ShortDurationLock s_lockPendingDeleteConnections( "connection_delete_queue" );
637637

638638
void CSteamNetworkConnectionBase::ConnectionQueueDestroy()
@@ -661,7 +661,7 @@ void CSteamNetworkConnectionBase::ProcessDeletionList()
661661
// want us to take a ShortDurationLock and then take any
662662
// other locks.
663663
s_lockPendingDeleteConnections.lock();
664-
std_vector<CSteamNetworkConnectionBase *> vecTemp( std::move( s_vecPendingDeleteConnections ) );
664+
std::vector<CSteamNetworkConnectionBase *> vecTemp( std::move( s_vecPendingDeleteConnections ) );
665665
s_vecPendingDeleteConnections.clear();
666666
s_lockPendingDeleteConnections.unlock();
667667

0 commit comments

Comments
 (0)