Skip to content
New issue

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

glib.Value dereferencing will finalize #34

Closed
diamondburned opened this issue Aug 30, 2021 · 0 comments
Closed

glib.Value dereferencing will finalize #34

diamondburned opened this issue Aug 30, 2021 · 0 comments
Assignees
Labels
bug Changes to fix bugs that do not require refactoring

Comments

@diamondburned
Copy link
Owner

Right now, pkg/core/glib.Value does not have the extra layer of indirection
that other structs have for finalizing, and as a result, dereferencing a Value
upon construction will cause it to be finalized early.

type Value struct {
	gvalue C.GValue
}

func NewValue(v interface{}) *Value

v := *NewValue("string")
// Underlying value might be finalized.
@diamondburned diamondburned self-assigned this Aug 30, 2021
@diamondburned diamondburned added the bug Changes to fix bugs that do not require refactoring label Aug 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Changes to fix bugs that do not require refactoring
Projects
None yet
Development

No branches or pull requests

1 participant