2022-04-02 02:48:54 +02:00
|
|
|
//============ Copyright Valve Corporation, All rights reserved. ============//
|
|
|
|
//
|
|
|
|
// Purpose:
|
|
|
|
//
|
|
|
|
// $NoKeywords: $
|
|
|
|
//
|
|
|
|
// A growable memory class.
|
|
|
|
//===========================================================================//
|
2022-05-01 23:03:20 +02:00
|
|
|
#pragma once
|
2022-04-02 02:48:54 +02:00
|
|
|
|
2022-05-20 20:14:39 +02:00
|
|
|
template <class T>
|
|
|
|
class CUtlMemory
|
2022-04-02 02:48:54 +02:00
|
|
|
{
|
2022-05-20 20:14:39 +02:00
|
|
|
public:
|
|
|
|
CUtlMemory() {};
|
|
|
|
CUtlMemory<T>(uintptr_t ptr) : m_pMemory(ptr) {};
|
|
|
|
|
|
|
|
private:
|
2022-04-02 02:48:54 +02:00
|
|
|
void* m_pMemory;
|
|
|
|
int64_t m_nAllocationCount;
|
|
|
|
int64_t m_nGrowSize;
|
|
|
|
};
|
|
|
|
|