I'm considering using StmContainers.Set ObjectId to implement per-object locking. Since we are creating and locking very many different objects over time this Set will potentially leak memory. Hence my question:
Does StmContainers.Set.delete actually free memory? In other words, is the memory residence of a StmContainer bounded by some constant factor times StmContainers.Set.size, or will each deleted object result in a sort of 'tombstone' and take up memory indefinitely?
For context: the ttrie library implements Control.Concurrent.STM.Map which seems to be largely equivalent to StmContainers.Map, but that suffers from delete potentially increasing the memory used.
Hi!
I'm considering using
StmContainers.Set ObjectId
to implement per-object locking. Since we are creating and locking very many different objects over time this Set will potentially leak memory. Hence my question:Does
StmContainers.Set.delete
actually free memory? In other words, is the memory residence of aStmContainer
bounded by some constant factor timesStmContainers.Set.size
, or will each deleted object result in a sort of 'tombstone' and take up memory indefinitely?For context: the
ttrie
library implements Control.Concurrent.STM.Map which seems to be largely equivalent toStmContainers.Map
, but that suffers fromdelete
potentially increasing the memory used.Thanks!