On the role of active memory processes in perception and cognition