What do you mean by "can not be released"? You shouldn't unref node2 and
node3 because gegl_node_new_child gives the only reference to the parent
node (node1 in this case), but if something is leaking after you free
processor, node1 and buffer that would be a bug.


On Thu, Sep 12, 2013 at 12:21 AM, 史龙 <jiewuxiaozi2...@gmail.com> wrote:

> Hi,all
>
>
> When I call the following function, my memory will rapidly increase.Can not 
> be released after the call is completed.Please help me diagnose.Thank you 
> very much.
>
> void processXmlData(const char *pXmlData)
>
> {
>
>     GeglNode    *node1      = NULL;
>
>     GeglNode    *node2      = NULL;
>
>     GeglNode    *node3     = NULL;
>
>     GeglBuffer  *buffer    = NULL;
>
>     double         progress = 0;
>
>
>     node1 = gegl_node_new_from_xml (pXmlData, NULL);
>
>     node2 = gegl_node_new_child (node1,
>
>                                             "operation", 
> "gegl:convert-format",
>
>                                             "format", "B'aG'aR'aA u8",
>
>                                             NULL);
>
>     node3 = gegl_node_new_child (node1,
>
>                                             "operation", "gegl:buffer-sink",
>
>                                             "buffer", &buffer,
>
>                                             NULL);
>
>     gegl_node_link_many (node1, node2, node3, NULL);
>
>     GeglProcessor *processor = gegl_node_new_processor (node3, NULL);
>
>     while (gegl_processor_work (processor, &progress))
>
>     {
>
>     }
>
>
>     g_object_unref (processor);
>
>     g_object_unref (node2);
>
>     g_object_unref (node3);
>
>     g_object_unref (node1);
>
>     g_object_unref(buffer);
>
> }
>
>
>
> Thanks
>
>
> _______________________________________________
> gegl-developer-list mailing list
> gegl-developer-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gegl-developer-list
>
>
_______________________________________________
gegl-developer-list mailing list
gegl-developer-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gegl-developer-list

Reply via email to