Package com.jme3.input.ios
Class TouchEventPool
java.lang.Object
com.jme3.input.ios.TouchEventPool
TouchEventPool provides a RingBuffer of jME TouchEvents to help with garbage
 collection on iOS.  Each TouchEvent is stored in the RingBuffer and is 
 reused if the TouchEvent has been consumed.
 
 If a TouchEvent has not been consumed, it is placed back into the pool at the 
 end for later use.  If a TouchEvent has been consumed, it is reused to avoid
 creating lots of little objects.
 
 If the pool is full of unconsumed events, then a new event is created and provided.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoiddestroy()Fetches a touch event from the reuse poolvoidvoidstoreEvent(TouchEvent event) Stores the TouchEvent back in the pool for later reuse.
- 
Constructor Details- 
TouchEventPoolpublic TouchEventPool(int maxEvents) 
 
- 
- 
Method Details- 
initializepublic void initialize()
- 
destroypublic void destroy()
- 
getNextFreeEventFetches a touch event from the reuse pool- Returns:
- a usable TouchEvent
 
- 
storeEventStores the TouchEvent back in the pool for later reuse. It is only reused if the TouchEvent has been consumed.- Parameters:
- event- TouchEvent to store for later use if consumed.
 
 
-