particle/list: optionally destroy sub particles

This was always done before. Now that it is optional, one can for
example generate lists dynamically, using the same set of base
particles over and over again.
This commit is contained in:
Daniel Eklöf 2018-11-17 17:13:45 +01:00
parent 24313ea75a
commit c5d3e934b4
3 changed files with 16 additions and 5 deletions

View file

@ -166,7 +166,8 @@ particle_list_from_config(const struct yml_node *node,
}
struct particle *list = particle_list_new(
parts, count, left_spacing, right_spacing, left_margin, right_margin);
parts, count, left_spacing, right_spacing, left_margin, right_margin,
true);
free(parts);
return list;