1
0

feat: add object pool for cdylib

This commit is contained in:
2026-05-09 16:27:04 +08:00
parent d4b52efee0
commit 6804b96078
5 changed files with 96 additions and 3 deletions

View File

@@ -50,3 +50,10 @@ pub fn set_string_cache(msg: &str) {
pub fn get_string_cache() -> *const c_char {
STRING_CACHE.with(|e| e.borrow().get_msg())
}
/// Clear thread local string cache.
pub fn clear_string_cache() {
STRING_CACHE.with(|e| {
e.borrow_mut().clear_msg();
});
}