/** * Return a VelocityTracker object back to be re-used by others. You must not touch the object * after calling this function. */ public void recycle() { sPool.release(this); }
/** * Retrieve a new VelocityTracker object to watch the velocity of a motion. Be sure to call {@link * #recycle} when done. You should generally only maintain an active object while tracking a * movement, so that the VelocityTracker can be re-used elsewhere. * * @return Returns a new VelocityTracker. */ public static VelocityTracker obtain() { return sPool.acquire(); }