JoshRosen commented on code in PR #48807: URL: https://github.com/apache/spark/pull/48807#discussion_r1835187704
########## core/src/main/scala/org/apache/spark/util/DirectByteBufferOutputStream.scala: ########## @@ -80,6 +96,7 @@ private[spark] class DirectByteBufferOutputStream(capacity: Int) extends OutputS override def close(): Unit = { // Eagerly free the direct byte buffer without waiting for GC to reduce memory pressure. StorageUtils.dispose(buffer) Review Comment: I checked and `StorageUtils.close(null)` is a no-op, so `close()` should be idempotent 👍 ########## core/src/main/scala/org/apache/spark/util/DirectByteBufferOutputStream.scala: ########## @@ -80,6 +96,7 @@ private[spark] class DirectByteBufferOutputStream(capacity: Int) extends OutputS override def close(): Unit = { // Eagerly free the direct byte buffer without waiting for GC to reduce memory pressure. StorageUtils.dispose(buffer) Review Comment: I checked and `StorageUtils.dispose(null)` is a no-op, so `close()` should be idempotent 👍 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org