Github user kiszk commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20862#discussion_r178626148
  
    --- Diff: core/src/main/scala/org/apache/spark/storage/DiskStore.scala ---
    @@ -301,7 +301,10 @@ private class ReadableChannelFileRegion(source: 
ReadableByteChannel, blockSize:
         written
       }
     
    -  override def deallocate(): Unit = source.close()
    +  override def deallocate() {
    +    source.close()
    +    StorageUtils.dispose(buffer)
    --- End diff --
    
    In other words, I think that the off-heap in `buffer` will not be leaked if 
`buffer` will be reclaimed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to