(issue #56) Fix TreeBuilder deallocation

Also, add a comment to the TODO file about a memory management issue
found throught pygit2.
This commit is contained in:
J. David Ibáñez 2012-02-26 19:57:33 +01:00
parent 4cdb1a83b4
commit 8b84f90a81
2 changed files with 5 additions and 0 deletions

@ -14,3 +14,7 @@ Other
- Make the Py_LOCAL_INLINE macro to work with Python 2.6, 2.7 and 3.1
- Use surrogateescape in Python 3, see PEP-383
- Expose the ODB (Repository.odb)
- According to Python documentation, tp_dealloc must call tp_free (instead of
PyObject_Del or similar) if the type is subclassable. So, go through the
code and switch to tp_free, or make the type not subclassable, on a case by
case basis.

@ -1607,6 +1607,7 @@ static void
TreeBuilder_dealloc(TreeBuilder* self)
{
git_treebuilder_free(self->bld);
PyObject_Del(self);
}
static PyObject *