Delete blob storage when disposing memory in computer block.
This commit is contained in:
@@ -149,8 +149,10 @@ public final class BlobStorage {
|
||||
*
|
||||
* @param handle the handle to free.
|
||||
*/
|
||||
public static void freeHandle(final UUID handle) {
|
||||
DELETED_HANDLES.add(handle);
|
||||
public static void freeHandle(@Nullable final UUID handle) {
|
||||
if (handle != null) {
|
||||
DELETED_HANDLES.add(handle);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -217,6 +217,9 @@ public final class ComputerTileEntity extends TileEntity implements ITickableTil
|
||||
virtualMachine.dispose();
|
||||
virtualMachine = null;
|
||||
}
|
||||
|
||||
BlobStorage.freeHandle(firmwareBlobHandle);
|
||||
BlobStorage.freeHandle(ramBlobHandle);
|
||||
}
|
||||
|
||||
private void joinVirtualMachine() {
|
||||
|
||||
Reference in New Issue
Block a user