sbinet / go-python

naive go bindings to the CPython2 C-API
Other
1.52k stars 138 forks source link

memory leak? #99

Closed HuangHongkai closed 4 years ago

HuangHongkai commented 4 years ago

When to call GC?Do users need manual GC?

sbinet commented 4 years ago

go-python is calling the CPython API through Cgo. so you have to program as in C and follow the reference counting of the CPython API (calling python.Object.IncRef() and python.Object.DecRef().)

there's no GC involved. you need to manually manage memory.