edu.wpi.first.wpilibj.communication
Class FRCControl.CachedNativeBuffer

java.lang.Object
  extended by edu.wpi.first.wpilibj.communication.FRCControl.CachedNativeBuffer
Enclosing class:
FRCControl

public static class FRCControl.CachedNativeBuffer
extends java.lang.Object

A simple 1-element cache that keeps a pointer to native memory around. Works best if repeatedly asked for buffers of same size.

WARNING: It's expected that the users of this cache are synchronized

Todo:
free the cache at shutdown...

Constructor Summary
FRCControl.CachedNativeBuffer()
           
 
Method Summary
 void free()
           
 Pointer getBufferSized(int size)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FRCControl.CachedNativeBuffer

public FRCControl.CachedNativeBuffer()
Method Detail

getBufferSized

public Pointer getBufferSized(int size)

free

public void free()