Reduced memory consumption of rerefencing example