The TWUCleanupUpdate function performs post-restart cleanup if the application was updated in-place. You should call this function the first time that your application starts after an update. However, there is no harm in calling it at every application startup.
The function does not return a value.
An in-place update (that is, if the update was installed while the current version of the application was running) typically leaves behind some files that could not be removed while they were in use by the current application. The TWUCleanupUpdate function deletes those files.