Here is a typical case:
In python, we use cffi to new a char* pointer:
charp = ffi.new("char []", ret)
And then the pointer charp return to C code. To prevent charp GC by PyPy before it really acess in C cdoe, we might put charp to a global list:
noGCList.append(charp).
And here are questions:
1. Could the pointer get free in C code?
2. If C code write "free (charp)", as in Python charp keep alive by noGCList, I think it is safe. But if noGCList is clean later, will it casue "double free" issue when PyPy try to GC charp?