Images stop being displayed after a few dozen attempts | developer.brewmp.com Images stop being displayed after a few dozen attempts | developer.brewmp.com

Developer

Images stop being displayed after a few dozen attempts

Forums:

I have an app with 3 screens, each screen has buttons which if pressed will navigate to another screen.

Each screen has an image displayed, however if I switch between the screens a few dozen times then the image stops being displayed but everything else on the screen continues to be displayed (there's some text, the buttons, soft keys).

 

I thought perhaps there is a memory leak and after a while there wasn't sufficient memory to lad the images, but I've put in checks after calling ISHELL_LoadImage() and its not failing. The image is being displayed using an image widget and the call to ISHELL_CreateInstance(AEECLSID_ImageWidget) is successful. The image widget is inserted into a root container and IRootContainer_Insert() is also returning AEE_SUCCESS.

 

So if all of these functions are not returning an error code, any suggestions as to why does the image stop being displayed after previously being successfully displayed a few dozen times?

 

 

 

Most probably image pointer is getting corrupted. If you used same pointer to load image everytime this happens.
If your images per page are not changing dynamically I would suggest load all the images once, may be during start-up and unload when no more needed.
 

Most probably image pointer is getting corrupted. If you used same pointer to load image everytime this happens.
If your images per page are not changing dynamically I would suggest load all the images once, may be during start-up and unload when no more needed.