We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
I am checking memory allocation & release with debug/pprof tool.
debug/pprof
And I found that heap profiler indicates following heap stack.
0: 0 [2: 48] @ 0x4613e53 0x45e5fe9 0x481deb1 0x4076681 # 0x4613e52 github.com/tinyzimmer/go-gst/gst.NewBufferFromBytes.func1+0x52 /Users/bkim/go/pkg/mod/github.com/tinyzimmer/[email protected]/gst/gst_buffer.go:101 # 0x45e5fe8 github.com/tinyzimmer/go-gst/gst.NewBufferFromBytes+0x48 /Users/bkim/go/pkg/mod/github.com/tinyzimmer/[email protected]/gst/gst_buffer.go:101
This is because Extract() returns C.GoBytes() which underlying array is a copy of the array in C area. And I couldn't find anywhere doing free for it.
C.GoBytes()
free
Please help me whether or not I have right understanding.
go-gst/gst/gst_buffer.go
Lines 387 to 394 in 5437f8a
The text was updated successfully, but these errors were encountered:
I would expect the defer C.free(dest) to be taking care of it, but this is an interesting case indeed. Will warrant a closer look.
defer C.free(dest)
Sorry, something went wrong.
@brucekim move this issue to https://github.com/go-gst/go-gst (where future development of the bindings will take place) if it is still necessary
No branches or pull requests
Hi,
I am checking memory allocation & release with
debug/pprof
tool.And I found that heap profiler indicates following heap stack.
This is because Extract() returns
C.GoBytes()
which underlying array is a copy of the array in C area.And I couldn't find anywhere doing
free
for it.Please help me whether or not I have right understanding.
go-gst/gst/gst_buffer.go
Lines 387 to 394 in 5437f8a
The text was updated successfully, but these errors were encountered: