won't the heap be released in destructor function of ApplicationService? since the observer is managed by scoped_ptr?