--- /dev/null
+* import upstream SVN patch (r106) to fix large memleak in C++ graph object
+Index: mathgl-1.10.2.1/mgl/mgl_ab.cpp
+===================================================================
+--- mathgl-1.10.2.1.orig/mgl/mgl_ab.cpp 2010-07-26 17:12:49.000000000 +1000
++++ mathgl-1.10.2.1/mgl/mgl_ab.cpp 2010-07-26 17:13:04.000000000 +1000
+@@ -44,7 +44,7 @@
+ }\r
+ //-----------------------------------------------------------------------------\r
+ mglGraphAB::~mglGraphAB()\r
+-{ if(G) { delete []G; delete []G4; } }\r
++{ if(G) { delete []G; delete []G4; delete []OI; } }\r
+ //-----------------------------------------------------------------------------\r
+ void mglGraphAB::Pop()\r
+ {\r
+@@ -370,7 +370,7 @@
+ if(font && strchr(font, 'a')) { Labelw(p.x, p.y, wcs,font,size,true); return; }
+
+ wchar_t *wcl;
+- int wn=0;
++ unsigned wn=0;
+ const wchar_t *wnl=0;
+ for(wn=0;wn<wcslen(wcs);wn++)
+ if(wcs[wn]=='\n' || (wcs[wn]=='\\' && wcs[wn+1]=='n'))
--- /dev/null
+Import upstream patch for SVG namespace (r 97)
+Index: mathgl-1.10.2.1/mgl/mgl_eps.cpp
+===================================================================
+--- mathgl-1.10.2.1.orig/mgl/mgl_eps.cpp 2010-07-26 17:10:06.000000000 +1000
++++ mathgl-1.10.2.1/mgl/mgl_eps.cpp 2010-07-26 17:10:16.000000000 +1000
+@@ -456,7 +456,7 @@
+ if(!fp) { SetWarn(mglWarnOpen,fname); return; }\r
+ fprintf(fp,"<?xml version=\"1.0\" standalone=\"no\"?>\n");\r
+ fprintf(fp,"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 20000303 Stylable//EN\" \"http://www.w3.org/TR/2000/03/WD-SVG-20000303/DTD/svg-20000303-stylable.dtd\">\n");\r
+- fprintf(fp,"<svg width=\"%d\" height=\"%d\">\n",Width,Height);\r
++ fprintf(fp,"<svg width=\"%d\" height=\"%d\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",Width,Height);\r
+ \r
+ fprintf(fp,"<!--Creator: MathGL library-->\n");\r
+ fprintf(fp,"<!--Title: %s-->\n<!--CreationDate: %s-->\n\n",descr?descr:fname,ctime(&now));\r