Skip to content
Discussion options

You must be logged in to vote

No need to apologize! And you're right because in typical Qt usage, QVariant is stack-allocated. The extra care we need to take isn't even because of the bindings or the heap allocations but because we've opted in to manual memory management. 😄 This isn't an issue for the bindings for Go because of the garbage collector. Where Qt can have stack-allocated types, all of ours will be heap-allocated and require manual cleanup. The same goes for the QColor objects in the example as they do for the QVariant objects. Based on the results, we could also have a patch with a single global QVariant placeholder and keep most of the original code as it was but replacing the return statements with the …

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@whatisaphone
Comment options

@whatisaphone
Comment options

@rcalixte
Comment options

Answer selected by whatisaphone
@rcalixte
Comment options

@whatisaphone
Comment options

@rcalixte
Comment options

@rcalixte
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants