message: Use std::unique_ptr in BFCAllocator::AllocationRegion.
diff: @@ -191,18 +191,14 @@ class BFCAllocator : public VisitableAllocator {
  DCHECK_EQ(0, memory_size % kMinAllocationSize);
  const size_t n_handles =
  (memory_size + kMinAllocationSize - 1) / kMinAllocationSize;
  - handles_ = new ChunkHandle[n_handles];
  + handles_.reset(new ChunkHandle[n_handles]);
  for (size_t i = 0; i < n_handles; i++) {
  handles_[i] = kInvalidChunkHandle;
  }
  }
  - AllocationRegion() {}
  -
  - ~AllocationRegion() { delete[] handles_; }
  -
  + AllocationRegion() = default;
  AllocationRegion(AllocationRegion&& other) { Swap(other); }
  -
  AllocationRegion& operator=(AllocationRegion&& other) {
  Swap(other);
  return *this;
  @@ -241,7 +237,7 @@ class BFCAllocator : public VisitableAllocator {
  // Array of size "memory_size / kMinAllocationSize". It is
  // indexed by (p-base) / kMinAllocationSize, contains ChunkHandle
  // for the memory allocation represented by "p"
  - ChunkHandle* handles_ = nullptr;
  + std::unique_ptr<ChunkHandle[]> handles_;
  TF_DISALLOW_COPY_AND_ASSIGN(AllocationRegion);
  };
  