diff --git a/src/sbml/packages/render/sbml/ListOfGlobalRenderInformation.cpp b/src/sbml/packages/render/sbml/ListOfGlobalRenderInformation.cpp index 5e7a877ea..3c8375f0a 100644 --- a/src/sbml/packages/render/sbml/ListOfGlobalRenderInformation.cpp +++ b/src/sbml/packages/render/sbml/ListOfGlobalRenderInformation.cpp @@ -789,6 +789,8 @@ ListOfGlobalRenderInformation::getAllElements(ElementFilter* filter) { List* ret = new List(); List* sublist = ListOf::getAllElements(filter); + ret->transferFrom(sublist); + delete sublist; ADD_FILTERED_POINTER(ret, sublist, mDefaultValues, filter); diff --git a/src/sbml/packages/render/sbml/ListOfLocalRenderInformation.cpp b/src/sbml/packages/render/sbml/ListOfLocalRenderInformation.cpp index 07e18eda2..32f73f3cc 100644 --- a/src/sbml/packages/render/sbml/ListOfLocalRenderInformation.cpp +++ b/src/sbml/packages/render/sbml/ListOfLocalRenderInformation.cpp @@ -760,6 +760,8 @@ ListOfLocalRenderInformation::getAllElements(ElementFilter* filter) { List* ret = new List(); List* sublist = ListOf::getAllElements(filter); + ret->transferFrom(sublist); + delete sublist; ADD_FILTERED_POINTER(ret, sublist, mDefaultValues, filter); diff --git a/src/sbml/packages/render/sbml/Style.cpp b/src/sbml/packages/render/sbml/Style.cpp index e126f2890..84db2c734 100644 --- a/src/sbml/packages/render/sbml/Style.cpp +++ b/src/sbml/packages/render/sbml/Style.cpp @@ -601,6 +601,7 @@ Style::createGroup() delete renderns; this->setGroup(g); + delete g; connectToChild(); @@ -1280,6 +1281,7 @@ Style::createObject(XMLInputStream& stream) RenderGroup* g = new RenderGroup(renderns); g->setElementName(name); setGroup(g); + delete g; obj = &mGroup; }