Nick Coghlan <ncogh...@gmail.com> added the comment: Ah, now that I go to implement it, I remember why I didn't like the idea of doing anything directly in PyObject_Del. While the Python memory allocator is primarily designed for allocation of Python objects, it isn't actually *limited* to that. So there is no guarantee that the void pointer passed in to PyObject_Del can be safely cast to a PyObject pointer.
The idea could still be implemented by scanning the list of active objects to see if the passed in pointer refers to one of them, but that would make object deallocation in pydebug builds extraordinarily slow. _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue3299> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com