Esempio n. 1
0
void free_all(allocs_info* info)
{
	for (int i = 0; i < info->count; ++i)
	{
#if		defined( CRT_LFH ) || defined( TBBMALLOC ) || defined( TCMALLOC )
		delete[] info->memory[i];
#elif	defined( MS_CONCURRENCY )
		Concurrency::Free(info->memory[i]);
#elif	defined( LOOKASIDE_HEAP )
		allocator.free(info->memory[i]);
#endif

		info->memory[i] = nullptr;
	}

	info->count = 0;
}
Esempio n. 2
0
void free_all(allocs_info* info)
{
	for (std::size_t i = 0; i < info->count; ++i)
	{
#if		defined(CRT_LFH) || defined(TBBMALLOC) || defined(TCMALLOC)
		delete[] info->memory[i];
#elif	defined(MS_CONCURRENCY)
		Concurrency::Free(info->memory[i]);
#elif	defined(MY_ALLOCATOR)
		allocator.free(info->memory[i]);
#elif defined(JEMALLOC)
		je_free(info->memory[i]);
#endif

		info->memory[i] = nullptr;
	}

	info->count = 0;
}