Harden MMKV close lifecycle handling #1669

This commit is contained in:
guoling
2026-07-29 14:56:48 +08:00
parent f3b27766a2
commit 4e3535f2c8
27 changed files with 316 additions and 73 deletions
+3 -3
View File
@@ -398,9 +398,9 @@ PYBIND11_MODULE(mmkv, m) {
clsMMKV.def("isReadOnly", &MMKV::isReadOnly, "check read-only mode");
clsMMKV.def("close", &MMKV::close,
"Permanently close the instance. This is terminal: all Python aliases "
"to the same native instance become invalid, and close must not race "
"with another operation.");
"Permanently close the native instance. All Python objects and other "
"bindings backed by the same instance become invalid immediately. "
"Close must not race with another operation and must not be repeated.");
clsMMKV.def_static("rootDir", &MMKV::getRootDir, "get the root directory of MMKV");