class_docstr: Manage GObject lifetime.
  
      
docstr: Wrap around a pointer.
  
  Wraps a GObject instance around an underlying pointer. When the
  instance is garbage-collected, the underlying object is unreferenced.
docstr_tok: ["Wrap","around","a","pointer",".","Wraps","a","GObject","instance","around","an","underlying","pointer",".","When","the","instance","is","garbage-collected",",","the","underlying","object","is","unreferenced","."]
code: def __init__(self, pointer):
      """Wrap around a pointer.
  
      Wraps a GObject instance around an underlying pointer. When the
      instance is garbage-collected, the underlying object is unreferenced.
  
      """
  
      # we have to record all of the ffi.new_handle we make for callbacks on
      # this object to prevent them being GC'd
      self._handles = []
  
      # record the pointer we were given to manage
      # on GC, unref
      self.pointer = ffi.gc(pointer, gobject_lib.g_object_unref)
  
file_path: pyvips/pyvips/gobject.py
imports: from __future__ import division
  import logging
  import pyvips
  from pyvips import ffi, gobject_lib, _to_bytes, Error, type_name, at_least_libvips
label_desc: Use image node_id 1 to create a new GObject object from inherited base classes: object with example: obj = GObject(pointer)