diff --git a/samples/torch/src/torchMain/kotlin/Disposable.kt b/samples/torch/src/torchMain/kotlin/Disposable.kt index 2d275137d26..2e94e0ed718 100644 --- a/samples/torch/src/torchMain/kotlin/Disposable.kt +++ b/samples/torch/src/torchMain/kotlin/Disposable.kt @@ -5,6 +5,15 @@ package sample.torch +/** + * NOTE: resource management in this sample suffers from resource leaks + * and double-free bugs (see workaround in [FloatTensor.dispose]). + * + * This might mean that the entire approach for resource management in the sample is faulty. + * Please take this into account when considering reusing the same approach in your project. + * + * TODO: rework resource management. +*/ interface Disposable { fun dispose() }