Package org.openstreetmap.josm.tools
Interface MemoryManager.MemoryHandle<T>
-
- Type Parameters:
T
- The content type.
- All Known Implementing Classes:
MemoryManager.ManualFreeMemoryHandle
- Enclosing class:
- MemoryManager
public static interface MemoryManager.MemoryHandle<T>
A memory area managed by theMemoryManager
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
free()
Manually release this memory area.T
get()
Gets the content of this memory area.long
getSize()
Get the size that was requested for this memory area.
-
-
-
Method Detail
-
get
T get()
Gets the content of this memory area.This method should be the preferred access to the memory since it will do error checking when
free()
was called.- Returns:
- The memory area content.
-
getSize
long getSize()
Get the size that was requested for this memory area.- Returns:
- the size
-
free
void free()
Manually release this memory area. There should be no memory consumed by this afterwards.
-
-