torch sample: add note about resource management

This commit is contained in:
Svyatoslav Scherbina
2020-07-29 20:20:45 +03:00
committed by SvyatoslavScherbina
parent b940c6da7e
commit 3c4be29bbb
@@ -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()
}