ETS - delete table not objects
Try and delete the table not just the objects in the table - will this improve memory leak?
This commit is contained in:
parent
43c5f2fb07
commit
7dc4913d5a
1 changed files with 3 additions and 2 deletions
|
@ -1188,8 +1188,9 @@ maybepush_ledgercache(MaxCacheSize, Cache, Penciller) ->
|
|||
case leveled_penciller:pcl_pushmem(Penciller, CacheToLoad) of
|
||||
ok ->
|
||||
Cache0 = #ledger_cache{},
|
||||
true = ets:delete_all_objects(Tab),
|
||||
{ok, Cache0#ledger_cache{mem=Tab}};
|
||||
true = ets:delete(Tab),
|
||||
NewTab = ets:new(mem, [ordered_set]),
|
||||
{ok, Cache0#ledger_cache{mem=NewTab}};
|
||||
returned ->
|
||||
{returned, Cache}
|
||||
end;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue