| 1120 | } |
| 1121 | |
| 1122 | bool MMKV::removeValueForKey(MMKVKey_t key) { |
| 1123 | if (isKeyEmpty(key)) { |
| 1124 | return false; |
| 1125 | } |
| 1126 | if (isReadOnly()) { |
| 1127 | MMKVWarning("[%s] file readonly", m_mmapID.c_str()); |
| 1128 | return false; |
| 1129 | } |
| 1130 | SCOPED_LOCK(m_lock); |
| 1131 | SCOPED_LOCK(m_exclusiveProcessLock); |
| 1132 | checkLoadData(); |
| 1133 | |
| 1134 | return removeDataForKey(key); |
| 1135 | } |
| 1136 | |
| 1137 | #ifndef MMKV_APPLE |
| 1138 |