Class Recycler

java.lang.Object
com.banuba.sdk.Recycler

public final class Recycler
extends java.lang.Object
Helper class to manually release Banuba SDK native objects before GC run.
  • Nested Class Summary

    Nested Classes
    Modifier and Type Class Description
    static class  Recycler.RecycleGuard<T>
    Helper class for try-with-resource statement.
  • Method Summary

    Modifier and Type Method Description
    static <T> T recycle​(T obj)
    Recycle Banuba SDK object.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • recycle

      public static <T> T recycle​(@Nullable T obj)
      Recycle Banuba SDK object. Call to force-release native memory associated with the object. The object must not be reused after this operation. Usage `obj = Recycler.recycle(obj);`
      Type Parameters:
      T -
      Parameters:
      obj -
      Returns:
      null