Skip to content

Commit

Permalink
add ResetUserDict()
Browse files Browse the repository at this point in the history
Signed-off-by: shewer <[email protected]>
  • Loading branch information
shewer committed Jun 20, 2024
1 parent 8c293fc commit 713ab6f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/rime/gear/memory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ Memory::~Memory() {
unhandled_key_connection_.disconnect();
}

void Memory::ResetUserDict(){
user_dict_.reset();
}

bool Memory::StartSession() {
return user_dict_ && user_dict_->NewTransaction();
}
Expand Down
1 change: 1 addition & 0 deletions src/rime/gear/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class Memory {
UserDictionary* user_dict() const { return user_dict_.get(); }

const Language* language() const { return language_.get(); }
void ResetUserDict();

protected:
void OnCommit(Context* ctx);
Expand Down

0 comments on commit 713ab6f

Please sign in to comment.