public class

PathPool

extends Object
java.lang.Object
   ↳ com.pdftron.pdf.utils.PathPool

Class Overview

Path Pool Pattern to avoid unnecessary memory allocation.

Summary

Constants
int length
Public Methods
void clear()
Clears the pool
static PathPool getInstance()
Path obtain()
void recycle(int count)
Recycles a specified number of paths to the pool
void recycle(List<Path> paths)
Recycles the paths to the pool
void recycle(Path path)
Recycles a path to the pool
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int length

Constant Value: 4096 (0x00001000)

Public Methods

public void clear ()

Clears the pool

public static PathPool getInstance ()

public Path obtain ()

Returns
  • a path

public void recycle (int count)

Recycles a specified number of paths to the pool

Parameters
count The number of path to be recycled

public void recycle (List<Path> paths)

Recycles the paths to the pool

Parameters
paths A list of paths to be recycled

public void recycle (Path path)

Recycles a path to the pool

Parameters
path The path