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.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static interfaceAllocator.AllocationNodeDeprecated.A node in a chain ofAllocations.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description Allocationallocate()Deprecated.Obtain anAllocation.intgetIndividualAllocationLength()Deprecated.Returns the length of each individualAllocation.intgetTotalBytesAllocated()Deprecated.Returns the total number of bytes currently allocated.voidrelease(Allocation allocation)Deprecated.Releases anAllocationback to the allocator.voidrelease(Allocator.AllocationNode allocationNode)Deprecated.Releases allAllocationsin the chain starting at the givenAllocator.AllocationNode.voidtrim()Deprecated.Hints to the allocator that it should make a best effort to release any excessAllocations.
 
- 
- 
- 
Method Detail- 
allocateAllocation allocate() Deprecated.Obtain anAllocation.When the caller has finished with the Allocation, it should be returned by callingrelease(Allocation).- Returns:
- The Allocation.
 
 - 
releasevoid release(Allocation allocation) Deprecated.Releases anAllocationback to the allocator.- Parameters:
- allocation- The- Allocationbeing released.
 
 - 
releasevoid release(Allocator.AllocationNode allocationNode) Deprecated.Releases allAllocationsin the chain starting at the givenAllocator.AllocationNode.Implementations must not make memory allocations. 
 - 
trimvoid trim() Deprecated.Hints to the allocator that it should make a best effort to release any excessAllocations.
 - 
getTotalBytesAllocatedint getTotalBytesAllocated() Deprecated.Returns the total number of bytes currently allocated.
 - 
getIndividualAllocationLengthint getIndividualAllocationLength() Deprecated.Returns the length of each individualAllocation.
 
- 
 
-