Plug a memory leak in clutter-table-layout
authorNeil Roberts <neil@linux.intel.com>
Wed, 6 Oct 2010 15:01:03 +0000 (16:01 +0100)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Fri, 8 Oct 2010 11:11:39 +0000 (12:11 +0100)
commit4724be167f19fe58cb38179e6f3b34b6797ff639
tree747fb6d893cd6f2afabdc742301cb1730b9de7d8
parent42dac6c9971fc33acae95f02d6e3605324a8d7f3
Plug a memory leak in clutter-table-layout

Whenever the allocation is changed on a child of a ClutterTableLayout
and animations are not in effect then it would store a copy of the
allocation in the child meta data. However it was not freeing the old
copy of the allocation so it would end up with a small leak.

Instead of just changing it to free the old value this patch makes it
store the allocation inline in the meta data struct because it seems
that the size of an actor box is already quite small compared to the
size of the meta data struct so it is probably not worth having a
separate allocation for it. To detect the case when there has not yet
been an allocation a separate boolean is used instead of storing NULL.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2358
clutter/clutter-table-layout.c