Description
While working on https://github.com/msu-coinlab/pymoo/pull/46 , it occurred to me that it would be convenient to be able to mark a map as "super-transient": as soon as it's iterated, it gets removed. This would help in situations where the user is not in manual control of map creation and some other library is driving HTMap around, probably creating lots of small, short maps that it will never use again (and if they failed, the library needs to fail as well).
The trick thing here is deciding what the conditions are for removing the map (what constitutes "being used"? Iterating to completion clearly counts, but what if I access each component individually once?), and what this mode should be called (remove_once_used = True
? remove_after_consumed = True
)?