Used to determine if an instance of the given class should be closed or not when a project session is terminated.