Interface Freeable
-
- All Known Subinterfaces:
ContiguousMemoryInterface,FragmentedMemoryInterface,RecyclableInterface<R,P>,RecyclerInterface<R,P>
- All Known Implementing Classes:
BasicRecycler,FileMappedMemoryRegion,FragmentedMemory,FreeableBase,MappedMemoryBase,MemoryBase,OffHeapMemory,SafeContiguousMemory
public interface FreeableFreeable class. Objects implementing this interface have some resource that can be used until freed.- Author:
- royer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcomplainIfFreed()Throws an exception when the object is freed more than once.voidfree()Free this object, which means that the underlying ressources are released.booleanisFree()Returns true if the object has been freed, which usually means that the underlying ressources are not longer available.
-
-
-
Method Detail
-
free
void free()
Free this object, which means that the underlying ressources are released.
-
isFree
boolean isFree()
Returns true if the object has been freed, which usually means that the underlying ressources are not longer available.- Returns:
- true if free
-
complainIfFreed
void complainIfFreed() throws FreedExceptionThrows an exception when the object is freed more than once.- Throws:
FreedException- exception thrown
-
-