40 getContext().checkContextMatch(g);
41 return Native.probeApply(getContext().nCtx(), getNativeObject(),
50 Probe(Context ctx, String name) {
51 super(ctx, Native.mkProbe(ctx.nCtx(), name));
56 Native.probeIncRef(getContext().nCtx(), getNativeObject());
60 void addToReferenceQueue() {
61 getContext().getReferenceQueue().storeReference(
this, ProbeRef::new);
64 private static class ProbeRef
extends Z3ReferenceQueue.Reference<Probe> {
66 private ProbeRef(Probe referent, ReferenceQueue<Z3Object> q) {
71 void decRef(Context ctx,
long z3Obj) {
72 Native.probeDecRef(ctx.nCtx(), z3Obj);