Bytes Image corruption in Windows Phone

Hi,

I am working in unity3d in windows phone 8 and I have a lot of .bytes image files. When i load image from file, it loads perfectly and is visible in camera. When I press the Device Home button and comes back in game , The image gets corrupted or invisible.
Below is the code :

        TextAsset text = Resources.Load("image", typeof(TextAsset)) as TextAsset;
        Texture2D texture = new Texture2D(0, 0, TextureFormat.RGB565, false);

        texture.LoadImage(text.bytes);

        texture.wrapMode = TextureWrapMode.Clamp;
        texture.filterMode = FilterMode.Bilinear;
        texture.Apply(false, true);

On Windows Phone 8.0, the OS purges video memory when an application is paused, so all the textures, meshes, etc. get deleted and need to be recreated. Unity does this silently for the textures it manages, however, I’m afraid it is not able to do it for ones loaded with Resources.Load.

To workaround, you’d need to recreate such textures in OnApplicationPause() callback.

Note: this is only an issue on Windows Phone 8.0 apps - Microsoft “fixed” it on Windows Phone 8.1.