public class TLcdSharedBuffer extends Object
TLcdSharedBuffer
has an ILcdBuffer
that it can
provide to several users for shared use.ILcdBuffer
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_SIZE
Deprecated.
getBufferInstance() now returns a buffer that relies on Java memory allocation and garbage collection. |
Constructor and Description |
---|
TLcdSharedBuffer() |
Modifier and Type | Method and Description |
---|---|
static void |
createBufferInstance(int aSize)
Deprecated.
use setBufferInstance(ILcdBuffer) instead.
|
static void |
dispose()
Removes the reference to the shared buffer held by this
TLcdSharedBuffer . |
static ILcdBuffer |
getBufferInstance()
Returns the shared buffer of this class.
|
static ILcdBuffer |
getBufferInstance(int aInt)
Deprecated.
initialize using setBufferInstance(ILcdBuffer) instead.
|
static void |
setBufferInstance(ILcdBuffer aBuffer)
Sets the shared
ILcdBuffer of this class. |
static ILcdBuffer |
XgetBufferInstance(int aSize)
Deprecated.
initialize using setBufferInstance(ILcdBuffer) instead.
|
public static final int DEFAULT_SIZE
getBufferInstance()
now returns a buffer that relies on Java memory allocation and garbage collection.public static void setBufferInstance(ILcdBuffer aBuffer)
ILcdBuffer
of this class.aBuffer
- the new ILcdBuffer.getBufferInstance()
public static ILcdBuffer getBufferInstance()
setBufferInstance(com.luciad.util.ILcdBuffer)
public static ILcdBuffer getBufferInstance(int aInt)
aInt
- the size of the buffer (expressed in MB; 1MB==220 bytes).setBufferInstance(com.luciad.util.ILcdBuffer)
public static void createBufferInstance(int aSize)
aSize
- the size of the buffer to be created, expressed in bytes.public static ILcdBuffer XgetBufferInstance(int aSize)
aSize
- size of the shared buffer expressed in bytesDEFAULT_SIZE
is created.createBufferInstance(int)
public static void dispose()
TLcdSharedBuffer
.
Objects that are already using the buffer can continue to use it.
If no other objects are referencing the buffer anymore, the virtual
machine's garbage collection can dispose of it, releasing the memory
space it is taking up.