FileDocCategorySizeDatePackage
VirtualRefBasePtr.javaAPI DocAndroid 5.1 API1464Thu Mar 12 22:22:10 GMT 2015com.android.internal.util

VirtualRefBasePtr

public final class VirtualRefBasePtr extends Object
Helper class that contains a strong reference to a VirtualRefBase native object. This will incStrong in the ctor, and decStrong in the finalizer

Fields Summary
private long
mNativePtr
Constructors Summary
public VirtualRefBasePtr(long ptr)

        mNativePtr = ptr;
        nIncStrong(mNativePtr);
    
Methods Summary
protected voidfinalize()

        try {
            release();
        } finally {
            super.finalize();
        }
    
public longget()

        return mNativePtr;
    
private static native voidnDecStrong(long ptr)

private static native voidnIncStrong(long ptr)

public voidrelease()

        if (mNativePtr != 0) {
            nDecStrong(mNativePtr);
            mNativePtr = 0;
        }