+ RemoveFocus( Dali::Toolkit::Control::DownCast( actor ) );
+}
+
+void KeyInputFocusManager::OnObjectDestroyed( const Dali::RefObject* object )
+{
+ // The object is already destroyed. Don't create handles to it, or try sending
+ // signals to it. Remove it's pointer from the stack.
+ const BaseObject* baseObject = static_cast<const BaseObject*>( object );
+ FocusStackIterator pos = std::find( mFocusStack.Begin(), mFocusStack.End(), baseObject );
+ if( pos != mFocusStack.End() )
+ {
+ mFocusStack.Erase( pos );
+ }