//------------------------------------------------------------------------------------------
	LinearAllocator::~LinearAllocator()
	{
		ASSERT_ERROR(getTotalAllocated() == 0, "Linear allocator has memory leaks");
		if (mStart)
		{
			SysAlloc::releaseSegment(static_cast<void*>(mStart), mSize);
			mStart = mCurrent = nullptr;
		}
	}
Example #2
0
StackAllocator::~StackAllocator()
{
	RIO_ASSERT(allocationCount == 0 && getTotalAllocated() == 0,
		"Missing %d deallocations causing a leak of %ld bytes", allocationCount, getTotalAllocated());
}