VT_Player/third_party/gotk3/glib/finalizers.go
Stu d4efa91ce1 Add vendored gotk3 GTK3 bindings for Go
Vendor gotk3 library to ensure consistent GTK3 bindings across
environments and simplify dependency management.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-15 05:40:43 -05:00

15 lines
578 B
Go

package glib
// Finalizer is a function that when called will finalize an object
type Finalizer func()
// FinalizerStrategy will be called by every runtime finalizer in gotk3
// The simple version will just call the finalizer given as an argument
// but in larger programs this might cause problems with the UI thread.
// The FinalizerStrategy function will always be called in the goroutine that
// `runtime.SetFinalizer` uses. It is a `var` to explicitly allow clients to
// change the strategy to something more advanced.
var FinalizerStrategy = func(f Finalizer) {
f()
}