Bug 12232 fixed: fix several memleaks in various filler
[scilab.git] / scilab / modules / graphic_objects / src / cpp / MatPlotDecomposer.cpp
index ed02c35..0d224de 100644 (file)
@@ -66,6 +66,8 @@ int MatPlotDecomposer::fillTextureData(char* id, unsigned char* buffer, int buff
             }
         }
 
+        releaseGraphicObjectProperty(__GO_COLORMAP__, colormap, jni_double_vector, colormapSize);
+
         return bufferLength;
     }
     else
@@ -99,6 +101,9 @@ int MatPlotDecomposer::fillTextureData(char* id, unsigned char* buffer, int buff
                 k += 4;
             }
         }
+
+        releaseGraphicObjectProperty(__GO_COLORMAP__, colormap, jni_double_vector, colormapSize);
+
         return bufferLength;
     }
     else