Use c++11 features
Remove unused call
Add call to deleteInstance

This is just for show, as the used memory is released anyway now.