Split memory management

Some attempts to address #1079 -- just for discussion at this point.
Does this comment mean that we should be removing this from the discard list on error?