forked from Leak_Technologies/VideoTools
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>
15 lines
578 B
Go
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()
|
|
}
|