Coding style

Colin Walters walters at verbum.org
Fri Nov 8 14:28:49 UTC 2013


On Fri, 2013-11-08 at 08:43 -0500, Stephen Gallagher wrote:

> I'm a big fan of hierarchical memory management, myself[1].

talloc is cool and is developed my competent people, and makes sense.
But the Cockpit codebase is using GLib, and when you start talking about
blending the two, it gets ugly - you need to worry about two allocators,
which call to free which pointer, etc.

In the end even with GLib we often end up with a hierarchy because
GObjects have "dispose" handlers which unreference the objects they
manage, and with any refcounting system you obviously can't create
circular references.




More information about the cockpit-devel mailing list