本文整理汇总了C++中FT_Memory::free方法的典型用法代码示例。如果您正苦于以下问题:C++ FT_Memory::free方法的具体用法?C++ FT_Memory::free怎么用?C++ FT_Memory::free使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FT_Memory
的用法示例。
在下文中一共展示了FT_Memory::free方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
FT_Done_Memory( FT_Memory memory )
{
#ifdef FT_DEBUG_MEMORY
ft_mem_debug_done( memory );
#endif
memory->free( memory, memory );
}
示例2:
FT_Done_FreeType_2(FT_Library library)
{
if(library)
{
FT_Memory memory = library->memory;
FT_Done_Library(library);
memory->free(memory, memory);
}
return FT_Err_Ok;
}
示例3:
FT_Free( FT_Memory memory,
void** P )
{
FT_TRACE7(( "FT_Free:" ));
FT_TRACE7(( " Freeing block 0x%08p, ref 0x%08p\n",
P, P ? *P : (void*)0 ));
if ( P && *P )
{
memory->free( memory, *P );
*P = 0;
}
}
示例4: sizeof
static FT_MemTable
ft_mem_table_new( FT_Memory memory )
{
FT_MemTable table;
table = (FT_MemTable)memory->alloc( memory, sizeof ( *table ) );
if ( !table )
goto Exit;
FT_ZERO( table );
table->size = FT_MEM_SIZE_MIN;
table->nodes = 0;
table->memory = memory;
table->memory_user = memory->user;
table->alloc = memory->alloc;
table->realloc = memory->realloc;
table->free = memory->free;
table->buckets = (FT_MemNode *)
memory->alloc(
memory,
table->size * (FT_Long)sizeof ( FT_MemNode ) );
if ( table->buckets )
FT_ARRAY_ZERO( table->buckets, table->size );
else
{
memory->free( memory, table );
table = NULL;
}
Exit:
return table;
}
示例5:
ft_mem_free( FT_Memory memory,
const void *P )
{
if ( P )
memory->free( memory, (void*)P );
}