Skip to content

Commit

Permalink
reword Object.Keep()
Browse files Browse the repository at this point in the history
  • Loading branch information
RSWilli committed Jun 24, 2024
1 parent 049fa91 commit 32b98b5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions glib/gobject.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,9 +349,8 @@ func (v *Object) WithTransferOriginal(f func()) {
}

// Keep will call runtime.KeepAlive on this or the extending object. It is useful for blocking
// a pending finalizer on this instance from firing and leaving you with a dangling pointer. Place
// this call where you are sure to be done with the object. This is a "go-like" equivalent to calling
// Ref(), defer Unref() in the object's new scope.
// a pending finalizer on this instance from firing and freeing the underlying C object.
// This is needed in the bindings where the Object goes out of scope but the C pointer is still needed.
func (v *Object) Keep() { runtime.KeepAlive(v) }

// GetPrivate returns a pointer to the private data stored inside this object.
Expand Down

0 comments on commit 32b98b5

Please sign in to comment.