java.lang.Object
io.qt.core.QScopedPointer<O>
- All Implemented Interfaces:
AutoCloseable
public final class QScopedPointer<O> extends Object implements AutoCloseable
Java wrapper for Qt class QScopedPointer to be used inside a try-with-resource block.
Example:
try(var pointer = QScopedPointer.disposing(new QDialog())){
QDialog dialog = pointer.get();
dialog.exec();
}
// dialog is disposed
-
Method Summary
Modifier and Type Method Description static <O> QScopedPointer<O>
cleanup(O data, Consumer<O> cleanup)
void
close()
O
data()
static <O extends QtJambiObject>
QScopedPointer<O>disposing(O data)
static <O extends QObject>
QScopedPointer<O>disposingLater(O data)
O
get()
boolean
isNull()
void
reset(O other)
void
swap(QScopedPointer<O> other)
O
take()