BIO_free function

  1. @RecordUse.new()
  2. @Native<Int Function(Pointer<BIO>)>(ffi.Pointer<BIO>)>(symbol: 'bssl_dart_BIO_free')
int BIO_free(
  1. Pointer<BIO> bio
)

BIO_free decrements the reference count of |bio|. If the reference count drops to zero, it calls the destroy callback, if present, on the method and frees |bio| itself. If |bio| is part of a chain (see |BIO_push|), this will also free the next |BIO| in the chain, and so on.

It returns one if |bio| was NULL or freed. It returns zero if |bio| was shared and some other owner still owns a reference count to it.

WARNING: Do not use the return value. Returning zero is not a sign of an error, nor an indication to retry the operation. |BIO| is a reference-counted type. A given |BIO| object may be shared between multiple parts of an application. To correctly track the reference count, without leaks or use-after-free, each part of the application must release only the reference counts it owns.

Implementation

@meta.RecordUse()
@ffi.Native<ffi.Int Function(ffi.Pointer<BIO>)>(symbol: 'bssl_dart_BIO_free')
external int BIO_free(
  ffi.Pointer<BIO> bio,
);