protected static class GObject.Handle extends RefCountedObject.Handle
Constructor and Description |
---|
Handle(org.freedesktop.gstreamer.lowlevel.GObjectPtr ptr,
boolean ownsHandle) |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Dispose the handle, and dispose the native reference if owned by this
handle.
|
protected void |
disposeNativeHandle(org.freedesktop.gstreamer.lowlevel.GPointer ptr)
Subclasses should override this method to dispose of the native
reference (free, unref, etc.).
|
protected org.freedesktop.gstreamer.lowlevel.GObjectPtr |
getPointer()
Get the native pointer, or null.
|
void |
invalidate()
Invalidate the handle.
|
protected void |
ref() |
protected void |
sink()
Sink floating reference.
|
String |
toString() |
protected void |
unref() |
disown, isCacheable, ownsReference
public Handle(org.freedesktop.gstreamer.lowlevel.GObjectPtr ptr, boolean ownsHandle)
public void invalidate()
NativeObject.Handle
NativeObject.Handle.getPointer()
will return null
, NativeObject.Handle.ownsReference()
will return
false
, and any NativeObject weak reference cached for this
pointer will be removed. Unlike calling NativeObject.Handle.dispose()
the
native handle will not be disposed - NativeObject.Handle.disposeNativeHandle(org.freedesktop.gstreamer.lowlevel.GPointer)
will not be called.invalidate
in class NativeObject.Handle
public void dispose()
NativeObject.Handle
NativeObject.Handle.getPointer()
will return null
, NativeObject.Handle.ownsReference()
will return
false
, and any NativeObject weak reference cached for this
pointer will be removed.dispose
in class NativeObject.Handle
protected void disposeNativeHandle(org.freedesktop.gstreamer.lowlevel.GPointer ptr)
NativeObject.Handle
NativeObject.Handle.getPointer()
will return null
by the time this
method is called.disposeNativeHandle
in class NativeObject.Handle
ptr
- native referenceprotected void ref()
ref
in class RefCountedObject.Handle
protected void sink()
protected void unref()
unref
in class RefCountedObject.Handle
protected org.freedesktop.gstreamer.lowlevel.GObjectPtr getPointer()
NativeObject.Handle
getPointer
in class NativeObject.Handle
Copyright © 2019 gstreamer-java. All rights reserved.