smarv at gmx.net wrote: > Now, the problem is, Python appears to read-access the deallocated memory > still after tp_dealloc. It's not clear exactly what you mean by "after tp_dealloc". The usual pattern is for a type's tp_dealloc method to call the base type's tp_dealloc, which can make further references to the object's memory. At the end of the tp_dealloc chain, tp_free gets called, which is what actually deallocates the memory. I would say your tp_dealloc shouldn't be modifying anything in the object struct that your corresponding tp_alloc method didn't set up, because code further along the tp_dealloc chain may rely on it. That includes fields in the object header. -- Greg
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4