summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9a16aaf)
raw | patch | inline | side by side (parent: 9a16aaf)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Sat, 20 Sep 2008 23:37:34 +0000 (23:37 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Sat, 20 Sep 2008 23:37:34 +0000 (23:37 +0000) |
index 33ac02a9b0df915c5dd9347bc771dd1a8ce5002c..89892aab48ed1d39aec805d67a468aa660f16de8 100644 (file)
--- a/src/dialogs/xml-tree.cpp
+++ b/src/dialogs/xml-tree.cpp
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(current_document);
Inkscape::XML::Node *new_repr;
new_repr = xml_doc->createElement(name.text);
+ Inkscape::GC::release(new_repr);
g_free(name.text);
selected_repr->appendChild(new_repr);
set_tree_select(new_repr);
index 615aeac7ae90d4ec006ea92d49f6992eee4597f7..e6b1bf60be0c5d0f791c76f6fd74a67127e96af1 100644 (file)
--- a/src/extension/effect.cpp
+++ b/src/extension/effect.cpp
{
if (get_last_effect() == this)
set_last_effect(NULL);
+ if (_menu_node)
+ Inkscape::GC::release(_menu_node);
return;
}
index cf133407a33b024a97b3850ba4e2ae56a0dc8315..80454f9edbdda7f2782e04c15f7dc4ab1c12216e 100644 (file)
selection->clear();
}
+ Inkscape::GC::release(new_group);
}
prefs_set_double_attribute("options.defaultoffsetwidth", "value", old_offset);
index 2b74c6f7ca95830eea40b4b705d71c1fec72c065..acddc1f9d639969287ef7193e00358668ee56219 100644 (file)
// add the new repr to the parent
parent->appendChild(repr);
+ Inkscape::GC::release(repr);
// move to the saved position
repr->setPosition(pos > 0 ? pos + 1 : 1);
index b2a55b6e6154a9c1522378bd133ad66185f32408..1ba0ce8cac6379485f4d54bc923ed5a3c6e3c389 100644 (file)
@@ -107,6 +107,7 @@ Filter::merge_filters (Inkscape::XML::Node * to, Inkscape::XML::Node * from, Ink
if (from_child == from->firstChild() && !strcmp("filter", from->name()) && srcGraphic != NULL && to_child->attribute("in") == NULL) {
to_child->setAttribute("in", srcGraphic);
}
+ Inkscape::GC::release(to_child);
}
return;
@@ -143,6 +144,8 @@ Filter::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View *d
Glib::ustring url = "url(#"; url += newfilterroot->attribute("id"); url += ")";
merge_filters(newfilterroot, get_filter(module)->root(), xmldoc);
+
+ Inkscape::GC::release(newfilterroot);
sp_repr_css_set_property(css, "filter", url.c_str());
sp_repr_css_set(node, css, "style");
@@ -175,6 +178,8 @@ Filter::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View *d
filternode->appendChild(alpha);
merge_filters(filternode, get_filter(module)->root(), xmldoc, FILTER_SRC_GRAPHIC, FILTER_SRC_GRAPHIC_ALPHA);
+
+ Inkscape::GC::release(alpha);
}
}
index 729b53cfd4f5c3a009b7b2fb37acf031fd1a55c0..cdd02882a82e6ea171de9629bdf028a5fa647208 100644 (file)
@@ -124,6 +124,7 @@ Grid::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View *doc
path->setAttribute("style", style.c_str());
current_layer->appendChild(path);
+ Inkscape::GC::release(path);
return;
}
index 6d1a1570c2f52a406000e222c9b993454c039ee4..5f434e5e13b28dd7a6aa972a5c74ce7d109c654d 100644 (file)
retval->setAttribute("name", _name);
parent->appendChild(retval);
+ Inkscape::GC::release(retval);
return retval;
}
params = xml_doc->createElement("inkscape:extension-param");
params->setAttribute("extension", extension->get_id());
defs->appendChild(params);
+ Inkscape::GC::release(params);
}
return params;
index 51b4b3f43c1b321fa2564c5acf5c7a3e7fd4ca95..aa93ffed9da47b9857f20f55b8918a914b0b59b3 100644 (file)
--- a/src/ui/context-menu.cpp
+++ b/src/ui/context-menu.cpp
SP_OBJECT(item)->deleteObject(false);
repr->addChild(child, NULL);
child->setAttribute("id", id);
+
+ Inkscape::GC::release(repr);
+ Inkscape::GC::release(child);
+
sp_document_done(SP_OBJECT_DOCUMENT(object), SP_VERB_NONE,
_("Create link"));
index 6571f4e978d9674428700df9e613dbcd9ad983be..06bc0dd733642057b0360c70dfe2145a481bd9ba 100644 (file)
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(prim->document);
Inkscape::XML::Node *repr = xml_doc->createElement(_light_source.get_active_data()->key.c_str());
prim->repr->appendChild(repr);
+ Inkscape::GC::release(repr);
}
sp_document_done(prim->document, SP_VERB_DIALOG_FILTER_EFFECTS, _("New light source"));
index 991e415d5eef98544efd1cc618bf9094224a1ac7..881f346285ffadb277413cebc13aa19e8c83be12 100644 (file)
sp_repr_set_css_double(child, "offset", 0.0);
child->setAttribute("style", os.str().c_str());
SP_OBJECT_REPR (gradient)->addChild(child, NULL);
+ Inkscape::GC::release(child);
child = xml_doc->createElement("svg:stop");
sp_repr_set_css_double(child, "offset", 1.0);
child->setAttribute("style", os.str().c_str());
SP_OBJECT_REPR (gradient)->addChild(child, NULL);
+ Inkscape::GC::release(child);
}
if (i < 2) {
sp_repr_set_css_double(SP_OBJECT_REPR(stop), "offset", 0.0);
Inkscape::XML::Node *child = SP_OBJECT_REPR(stop)->duplicate(SP_OBJECT_REPR(gradient)->document());
sp_repr_set_css_double(child, "offset", 1.0);
SP_OBJECT_REPR(gradient)->addChild(child, SP_OBJECT_REPR (stop));
+ Inkscape::GC::release(child);
}
}