feat: add object pool for cdylib
This commit is contained in:
@@ -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();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user