(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:
parent
4cdb1a83b4
commit
8b84f90a81
4
TODO.txt
4
TODO.txt
@ -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.
|
||||
|
1
pygit2.c
1
pygit2.c
@ -1607,6 +1607,7 @@ static void
|
||||
TreeBuilder_dealloc(TreeBuilder* self)
|
||||
{
|
||||
git_treebuilder_free(self->bld);
|
||||
PyObject_Del(self);
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
|
Loading…
x
Reference in New Issue
Block a user