ETS delete
Delete the objects rather than starting a new table each time
This commit is contained in:
parent
2758498fad
commit
6f06c6fdeb
2 changed files with 4 additions and 1 deletions
|
@ -88,6 +88,9 @@ add_to_index(LevelMinus1, L0Index) ->
|
|||
new_index() ->
|
||||
ets:new(l0index, [private, set]).
|
||||
|
||||
clear_index(L0Index) ->
|
||||
ets:delete_all_objects(L0Index).
|
||||
|
||||
check_index(Hash, L0Index) ->
|
||||
case ets:lookup(L0Index, Hash) of
|
||||
[{Hash}] ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue