Library deletion completed
This commit is contained in:
parent
f5f381b37a
commit
d7d8e6b2dc
15
gdsparse.c
15
gdsparse.c
@ -641,9 +641,21 @@ static void delete_cell_inst_element(struct gds_cell_instance *cell_inst)
|
|||||||
free(cell_inst);
|
free(cell_inst);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void delete_vertex(struct gds_point *vertex)
|
||||||
|
{
|
||||||
|
free(vertex);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void delete_graphics_obj(struct gds_graphics *gfx)
|
||||||
|
{
|
||||||
|
g_list_free_full(gfx->vertices, (GDestroyNotify)delete_vertex);
|
||||||
|
free(gfx);
|
||||||
|
}
|
||||||
|
|
||||||
static void delete_cell_element(struct gds_cell *cell)
|
static void delete_cell_element(struct gds_cell *cell)
|
||||||
{
|
{
|
||||||
g_list_free_full(cell->child_cells, (GDestroyNotify)delete_cell_inst_element);
|
g_list_free_full(cell->child_cells, (GDestroyNotify)delete_cell_inst_element);
|
||||||
|
g_list_free_full(cell->graphic_objs, (GDestroyNotify)delete_graphics_obj);
|
||||||
free(cell);
|
free(cell);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -656,7 +668,8 @@ static void delete_library_element(struct gds_library *lib)
|
|||||||
|
|
||||||
int clear_lib_list(GList **library_list)
|
int clear_lib_list(GList **library_list)
|
||||||
{
|
{
|
||||||
if (*library_list == NULL) return 0;
|
if (*library_list == NULL)
|
||||||
|
return 0;
|
||||||
g_list_free_full(*library_list, (GDestroyNotify)delete_library_element);
|
g_list_free_full(*library_list, (GDestroyNotify)delete_library_element);
|
||||||
*library_list = NULL;
|
*library_list = NULL;
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user