+ const std::size_t count = mLoadingTaskInfoContainer.Count();
+ for( std::size_t i=0; i < count; ++i )
+ {
+ // Call unregister to every observer in the list.
+ // Note that, the Atlas can be registered to same observer multiple times, and the Unregister method only remove one item each time.
+ // In this way, the atlas is actually detached from a observer either every upload call invoked by this observer is completed or atlas is destroyed.
+ if( mLoadingTaskInfoContainer[i]->observer )
+ {
+ mLoadingTaskInfoContainer[i]->observer->Unregister( *this );
+ }
+ }
+
+ mLoadingTaskInfoContainer.Clear();