to unset $di, $application blah blah blah...
All non-temporary resources and variables allocated during a requests are automatically freed by PHP, so it's only necessary if you need to release something that php cannot know to.