I solved my problem.
In your idevice go to setting --> general --> about - > diagnostic and usage --> diagnostic and usage data and look for com.apple.TextInput error. Because this file I had problem with memony and overheat.
In your mac os x go to ~/Library/com~apple~TextInput. Look for the same file. In my case this file had almost 5 mb.
If you are with this situation do this: