Interface Allocator

  • All Known Implementing Classes:
    DefaultAllocator

    @Deprecated
    public interface Allocator
    Deprecated.
    com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
    A source of allocations.
    • Method Detail

      • release

        void release​(Allocation allocation)
        Deprecated.
        Releases an Allocation back to the allocator.
        Parameters:
        allocation - The Allocation being released.
      • trim

        void trim()
        Deprecated.
        Hints to the allocator that it should make a best effort to release any excess Allocations.
      • getTotalBytesAllocated

        int getTotalBytesAllocated()
        Deprecated.
        Returns the total number of bytes currently allocated.
      • getIndividualAllocationLength

        int getIndividualAllocationLength()
        Deprecated.
        Returns the length of each individual Allocation.