MCPcopy Create free account
hub / github.com/ValveSoftware/GameNetworkingSockets / TakeOwnershipOfMemory

Method TakeOwnershipOfMemory

src/tier1/utlbuffer.cpp:1616–1624  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Take ownership of mem from a CUtlMemory -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1614// Take ownership of mem from a CUtlMemory
1615//-----------------------------------------------------------------------------
1616void CUtlBuffer::TakeOwnershipOfMemory( CUtlMemory<uint8> &mem )
1617{
1618 m_Get = 0;
1619 m_Put = mem.Count();
1620 m_nMaxPut = mem.Count();
1621 m_Error = 0;
1622 m_Memory.Swap( mem );
1623 mem.Purge();
1624}
1625
1626
1627//-----------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 3

CountMethod · 0.45
SwapMethod · 0.45
PurgeMethod · 0.45

Tested by

no test coverage detected