|
From: Diego N. <dno...@go...> - 2015-05-14 21:30:57
|
Clang will soon start emitting warnings for mismatch uses of new and
delete. In testing this upcoming feature of Clang, I found a
mismatched new/delete pair in matplotlib. I've applied the following
patch in my local tree, but I see that the problem still exists in
trunk.
The problem here is that the constructor for
ExtensionClassMethodsTable() is allocating an array of
m_methods_table, so it should be deallocated with delete[].
If this is OK for trunk, could someone apply this patch, please?
Thanks. Diego.
--- a/lib/matplotlib/src/CXX/Python2/ExtensionType.hxx
+++ b/lib/matplotlib/src/CXX/Python2/ExtensionType.hxx
@@ -125,7 +125,7 @@ namespace Py
~ExtensionClassMethodsTable()
{
- delete m_methods_table;
+ delete[] m_methods_table;
}
// check that all methods added are unique
|