Jelajahi Sumber

Add missing Py_DECREF to quiver()

Alex Dewar 6 tahun lalu
induk
melakukan
3d555d2264
1 mengubah file dengan 1 tambahan dan 0 penghapusan
  1. 1 0
      matplotlibcpp.h

+ 1 - 0
matplotlibcpp.h

@@ -511,6 +511,7 @@ bool quiver(const std::vector<NumericX>& x, const std::vector<NumericY>& y, cons
     PyObject* res = PyObject_Call(
             detail::_interpreter::get().s_python_function_quiver, plot_args, kwargs);
 
+    Py_DECREF(kwargs);
     Py_DECREF(plot_args);
     if (res)
         Py_DECREF(res);