From 2713a21615541453cfb86051a04616a51f474130 Mon Sep 17 00:00:00 2001 From: Yizhi Liu Date: Fri, 24 Aug 2018 16:57:50 -0700 Subject: [PATCH] explain the details for Scala Experimental --- .../src/main/scala/org/apache/mxnet/NDArrayCollector.scala | 4 ++++ .../main/scala/org/apache/mxnet/annotation/Experimental.scala | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/scala-package/core/src/main/scala/org/apache/mxnet/NDArrayCollector.scala b/scala-package/core/src/main/scala/org/apache/mxnet/NDArrayCollector.scala index 3952b73cfb06..0b7f9af705f1 100644 --- a/scala-package/core/src/main/scala/org/apache/mxnet/NDArrayCollector.scala +++ b/scala-package/core/src/main/scala/org/apache/mxnet/NDArrayCollector.scala @@ -133,6 +133,10 @@ class NDArrayCollector private(private val autoDispose: Boolean = true, * If the return type of scope is NDArray or NDArrayFuncReturn, * it is smart enough NOT to collect or dispose the returned NDArray.
* However in other cases, it is users' responsibility NOT to leak allocated NDArrays outside. + *
+ * We might switch to try -with-resources statement (by AutoCloseable in Java 1.7+) + * and deprecate this method later, thus it is marked as Experimental. + * * @param codeBlock code block to be executed within the scope. * @tparam T return type of the function codeBlock. * @return The result of function codeBlock. diff --git a/scala-package/core/src/main/scala/org/apache/mxnet/annotation/Experimental.scala b/scala-package/core/src/main/scala/org/apache/mxnet/annotation/Experimental.scala index 147d651fb04f..d63194d48bc5 100644 --- a/scala-package/core/src/main/scala/org/apache/mxnet/annotation/Experimental.scala +++ b/scala-package/core/src/main/scala/org/apache/mxnet/annotation/Experimental.scala @@ -21,7 +21,7 @@ import java.lang.annotation.{ElementType, Retention, Target, _} /** * Experimental: there is a comparably high chance that - * the API will undergo some kind of changes + * the API will be changed or removed. */ @Retention(RetentionPolicy.RUNTIME) @Target(Array(ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER,