Re: [anjuta-devel] New project interface and introspection
- From: Sébastien Granjoux <seb sfo free fr>
- To: Abderrahim Kitouni <a kitouni gmail com>
- Cc: anjuta-devel-list gnome org
- Subject: Re: [anjuta-devel] New project interface and introspection
- Date: Wed, 22 Sep 2010 22:02:07 +0200
Hi Abderrahim,
I have changed the AnjutaProjectNode to use GObject, it's working but
there are two issues.
1. In C, when you create a node you get a reference to it and when you
add it in the project, the parent increment the reference count too. So
you need to call g_object_unref after inserting each node in the project
which is the most common operation. I have thought to use floating
reference, but I'm afraid I have to use some uncommon functions those
will not be fully supported. In Python, it doesn't matter because the
call to g_object_unref is done automatically.
2. Reloading a node is done in a different thread. To avoid accessing
the same object from a different thread, before loading the node, I
remove it from the project tree replacing it with a dummy node and pass
the original node to the loading function. But if some other piece of
code has kept a reference on the original node, it is possible that both
the worker thread and this code use the same object. So, it's quite
dangerous to get a reference on a node object anyway.
Do you have some idea to solve these issues ?
Regards,
Sébastien
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]