void close() {
            lock.writeLock().lock();
            try {
                long toFree = bio;
                bio = 0L;
                if (toFree != 0L) {
                    NativeCrypto.BIO_free_all(toFree);
                }
            } finally {
                lock.writeLock().unlock();
            }
        }
A utility wrapper that abstracts operations on the underlying native BIO instance.
common/src/main/java/org/conscrypt/NativeSsl.java