Skip to content
Snippets Groups Projects
Commit 579e7313 authored by Richard Schwarting's avatar Richard Schwarting
Browse files

DomNode.vala, NodeList.vala: make references to Document weak to break ref...

DomNode.vala, NodeList.vala: make references to Document weak to break ref cycles preventing finalisation
parent d927ac47
No related branches found
No related tags found
No related merge requests found
......@@ -134,7 +134,7 @@ namespace GXml {
/**
* A link to the Document to which this node belongs.
*/
public Document owner_document {
public weak Document owner_document {
get;
internal set;
}
......
......@@ -413,7 +413,7 @@ namespace GXml {
same with nodes from GetElementByTagName, made need separate impls for each */
// TODO: if necessary, create two versions that use parent instead of head
internal Document owner;
internal weak Document owner;
internal abstract Xml.Node *head { get; set; }
internal abstract Xml.Node *parent_as_xmlnode { get; }
......@@ -606,7 +606,7 @@ namespace GXml {
/* ** NodeListIterator ***/
private class NodeListIterator : GenericNodeListIterator {
private Document doc;
private weak Document doc;
private Xml.Node *cur;
private Xml.Node *head;
private Xml.Node *next_node;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment