Reference-Related Memory Management in Intelligent Agents Emulating Humans