AngularJS app that simulates memory management