Package org.openstreetmap.josm.tools
Class MemoryManager.ManualFreeMemoryHandle<T>
java.lang.Object
org.openstreetmap.josm.tools.MemoryManager.ManualFreeMemoryHandle<T>
- All Implemented Interfaces:
MemoryManager.MemoryHandle<T>
- Enclosing class:
- MemoryManager
private class MemoryManager.ManualFreeMemoryHandle<T>
extends Object
implements MemoryManager.MemoryHandle<T>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
name
-
-
size
-
-
Constructor Details
-
ManualFreeMemoryHandle
ManualFreeMemoryHandle(String name, T content, long size)
-
-
Method Details
-
get
Description copied from interface:MemoryManager.MemoryHandleGets the content of this memory area.This method should be the preferred access to the memory since it will do error checking when
MemoryManager.MemoryHandle.free()was called.- Specified by:
getin interfaceMemoryManager.MemoryHandle<T>- Returns:
- The memory area content.
-
getSize
Description copied from interface:MemoryManager.MemoryHandleGet the size that was requested for this memory area.- Specified by:
getSizein interfaceMemoryManager.MemoryHandle<T>- Returns:
- the size
-
free
Description copied from interface:MemoryManager.MemoryHandleManually release this memory area. There should be no memory consumed by this afterwards.- Specified by:
freein interfaceMemoryManager.MemoryHandle<T>
-
toString
-