code: @Override
      public void purgeDeviceObject(Long threadId, Integer deviceId, Long objectId, AllocationPoint point,
                      boolean copyback) {
          if (point.getAllocationStatus() != AllocationStatus.DEVICE)
              return;
  
          flowController.waitTillReleased(point);
  
          free(point, AllocationStatus.DEVICE);
  
          if (!deviceAllocations.get(deviceId).containsKey(objectId))
              throw new IllegalStateException("Can't happen ever");
  
          forget(point, AllocationStatus.DEVICE);
  
          if (deviceAllocations.get(deviceId).containsKey(objectId))
              throw new IllegalStateException("Can't happen ever");
  
          deviceMemoryTracker.subFromAllocation(threadId, deviceId, AllocationUtils.getRequiredMemory(point.getShape()));
  
          point.setAllocationStatus(AllocationStatus.HOST);
  
          //environment.trackAllocatedMemory(deviceId, AllocationUtils.getRequiredMemory(point.getShape()));
      }
docs: This method explicitly removes object from device memory.
  
  @param threadId
  @param objectId
  @param copyback  if TRUE, corresponding memory block on JVM side will be updated, if FALSE - memory will be just discarded