本文整理汇总了C++中Drawable::destroy方法的典型用法代码示例。如果您正苦于以下问题:C++ Drawable::destroy方法的具体用法?C++ Drawable::destroy怎么用?C++ Drawable::destroy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Drawable
的用法示例。
在下文中一共展示了Drawable::destroy方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: StaticTrace_destroy
void StaticTrace_destroy(StaticTrace* self, bool deleteTiles)
{
uint32_t i, j;
for(i=0; i < self->nbCasesX; i++)
{
if(deleteTiles)
{
for(j=0; j < self->nbCasesY; j++)
{
Drawable* tile = (Drawable*)(self->tiles[i][j]);
Drawable* object = (Drawable*)(self->objects[i][j]);
if(tile != NULL)
tile->destroy(tile);
if(object != NULL)
object->destroy(object);
}
}
free(self->tiles[i]);
free(self->objects[i]);
}
free(self->tiles);
free(self->objects);
free(self);
}
示例2: Object_destroy
void Object_destroy(Drawable* drawable)
{
Object* self = (Object*)drawable;
uint32_t i, j;
for(i=0; i < self->nbCasesX; i++)
{
for(j=0; j < self->nbCasesY; j++)
{
Drawable* tile = (Drawable*)(self->tiles[i][j]);
if(tile != NULL)
tile->destroy(tile);
}
free(self->tiles[i]);
}
free(self->tiles);
free(self);
}
示例3: DynamicTrace_destroy
void DynamicTrace_destroy(DynamicTrace* self)
{
uint32_t i, j, k;
for(i=0; i < self->nbCasesX; i++)
{
for(j=0; j < self->nbCasesY; j++)
{
for(k=0; k < List_getLen(self->tiles[i][j]); k++)
{
Drawable* tile = List_getData(self->tiles[i][j], k);
if(tile)
tile->destroy(tile);
}
List_destroy(self->tiles[i][j]);
}
free(self->tiles[i]);
}
free(self->tiles);
free(self);
}