Content-Length: 258241 | pFad | http://github.com/pythonAI/go-python/commit/dc533f6642b666677ae72f6b745dcb4aa60003c4

1A free memory · pythonAI/go-python@dc533f6 · GitHub
Skip to content

Commit dc533f6

Browse files
eliothedemansbinet
authored andcommitted
free memory
1 parent f43dcc3 commit dc533f6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

otherobjects.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,10 @@ func PyCallIter_New(callable, sentinel *PyObject) *PyObject {
596596
// Return value: New reference.
597597
// Return an empty CodePythonObject that corosponds to the file name, func name and line number in the source file it points to.
598598
func PyCode_NewEmpty(filename string, funcname string, firstlineno int) *PyObject {
599+
c_filename := C.CString(filename)
600+
c_funcname := C.CString(funcname)
601+
defer C.free(unsafe.Pointer(c_filename))
602+
defer C.free(unsafe.Pointer(c_funcname))
599603
return togo((*C.PyObject)(unsafe.Pointer(C.PyCode_NewEmpty(C.CString(filename), C.CString(funcname), C.int(firstlineno)))))
600604
}
601605

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/pythonAI/go-python/commit/dc533f6642b666677ae72f6b745dcb4aa60003c4

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy