Re: [gdome]future memory management plans? (was: News(2) on CVS preparing 0.7.0)
- From: Paolo Casarini <casarini CS UniBO IT>
- To: Tobias Peters <t-peters gmx de>
- Cc: gdome gnome org
- Subject: Re: [gdome]future memory management plans? (was: News(2) on CVS preparing 0.7.0)
- Date: Fri, 9 Nov 2001 09:15:20 +0100 (CET)
On Wed, 7 Nov 2001, Tobias Peters wrote:
> Dear Paolo and other list members,
>
> my impression is that the new memory management works as intended: gdome2
> now knows when to delete libxml's tree structure. There is another problem
> that did not think of when we dicussed about the whole memory management
> issue: It does not know what to delete.
>
> Sure, the libxml tree structure beneath the document node is deleted at
> this point in time, using xmlFreeDoc, but let me cite from the DOM 2 Core
> recommendation:
>
> "In the DOM, documents have a logical structure which is very much like a
> tree; to be more precise, which is like a `forest' or `grove', which can
> contain more than one tree."
>
> The other trees can be subtrees cut off the main tree with removeChild,
> subtrees copied with cloneNode, or Nodes created by Document's
> createSomeNode. These are not deleted by xmlFreeDoc.
>
> The conclusion is to me that it is not enough to keep track of living
> nodes at the document level. In addition to the document level, this has
> to be done at the tree level, too.
>
> I think this is difficult to implement on the current code base. So I want
> to ask you people on this list, and the maintainers of gdome, how you're
> regarding this issue.
I think I can resolve the problem you have focused in the next week-end. I
think I can resolve it without adding any other memory structure only
using reference counting and information holded by the libxml2 xmlNode
structure.
Bye,
paolo.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]