Removes the mapping for the specified key and optionally invokes dg with
the value that is about to be removed.
Note that, if references to GC-allocated objects (objects or dynamic
arrays), it is a good idea to set the value referenced to by the
returned pointer to null to avoid these objects from being prevented
from garbage collection. In general pointers should be set to null for
the same reason and to avoid dangling pointers.
If the default allocator is used (that is, no allocator instance was
passed to the constructor), the value referenced by the val parameter of
dg is accessible and remains unchanged after dg returned until the next
call to put() or clear().
Removes the mapping for the specified key and optionally invokes dg with the value that is about to be removed.
Note that, if references to GC-allocated objects (objects or dynamic arrays), it is a good idea to set the value referenced to by the returned pointer to null to avoid these objects from being prevented from garbage collection. In general pointers should be set to null for the same reason and to avoid dangling pointers.
If the default allocator is used (that is, no allocator instance was passed to the constructor), the value referenced by the val parameter of dg is accessible and remains unchanged after dg returned until the next call to put() or clear().