trie: implement clone() method (#852)
* Add Clone() for StringMap * Fix for std::string addition * trie: broken return key. * clonetrie: correct handle leakage. Co-authored-by: Kyle Sanderson <[email protected]>
This commit is contained in:
co-authored by
Kyle Sanderson
parent
b8ae4e617b
commit
5fa25e70ad
@@ -52,6 +52,14 @@ methodmap StringMap < Handle
|
||||
// The StringMap must be freed via delete or CloseHandle().
|
||||
public native StringMap();
|
||||
|
||||
// Clones a string map, returning a new handle with the same size and data.
|
||||
// This should NOT be confused with CloneHandle. This is a completely new
|
||||
// handle with the same data but no relation to the original. It should be
|
||||
// closed when no longer needed with delete or CloseHandle().
|
||||
//
|
||||
// @return New handle to the cloned string map
|
||||
public native StringMap Clone();
|
||||
|
||||
// Sets a value in a hash map, either inserting a new entry or replacing an old one.
|
||||
//
|
||||
// @param key Key string.
|
||||
|
||||
Reference in New Issue
Block a user