Add clearReloadables

This commit is contained in:
Edwin Jakobs
2019-11-03 21:27:34 +01:00
parent 37a8771de0
commit 8e26f9514b
2 changed files with 9 additions and 0 deletions

View File

@@ -60,6 +60,8 @@ import org.openrndr.draw.*
}
}
```
The Reloadable store can be cleared using the `clearReloadables` function
Keep in mind that `Reloadable` should only be used for singleton classes.
## Persistent Data

View File

@@ -7,6 +7,13 @@ import kotlin.reflect.jvm.jvmName
private val store = mutableMapOf<String, Any>()
/**
* Clear reloadable values
*/
fun clearReloadables() {
store.clear()
}
/**
* A class with which persistent state can be reloaded from inside Olive scripts.
*/