Complete Memory Clear Down

Hi

We have an issue.  We have a large Corona Business System which has multiple screens with data being loaded.  Although we have tried to eliminate all of the bugs, but of course there are some still knocking around, mostly to do with data and mismatching.

We have a global runtime error trap which we use to catch the issue. What we are finding is that we still have display objects in memory.  Is there anyway of clearing down all items so that when we reset the system it is completely clean?

With IOS we cannot “reboot” a system so we have to do this manually…  what is the best way do you think?

I’m not quite sure I follow what the problem is. It sounds like you’re creating display objects and not removing them, creating memory leaks.  Can you provide some code examples of how you’re creating your display objects and how you’re freeing them? Are you using Composer, our scene manager?

Rob

We are still using the old storyboard code Rob.  It was kind of built in to our project and taking it out was difficult.  Is Composer a big improvement on this as we would put the effort in if we thought it would make a big difference?

We are finding that when we have a runtime error the global error catching is firing and we navigate them to a screen that displays the error and lets the user report it to us…  However, on occasions some display objects are left behind. I think they may be related to network.request calls that are in flight after the error has called.

It is not a massive issue, but what I would like is if we do have an error and the user selects to Restart the App we really want that to mean a Restart (e.g. we clear anything down if anything is in memory).  Is there a way of cycling through a display object array and removing everything manually?

Hi rob,

Sorry for posting in this thread, I have an issue, I am creating a display.newText and i am inserting that in to a scroll View, instead of text i am seeing a white box. 

But when i remove it from the scroll view the text looks perfect.

local   myText = display.newText("yuuu", tempX - 50,textY ,self.fontNormal, 35 ) innerChatScrollView1:insert(myText) 

Hope i can find some solution. 

Why are you hi-jacking this thread?

@kumarks102, please start a new thread.

@matt405, Storyboard is fine. As long as your inserting your display objects into your storyboard view group, then removing the scene will clear it up.  

Are you downloading images and that’s where you’re catching the errors? 

I’m not quite sure I follow what the problem is. It sounds like you’re creating display objects and not removing them, creating memory leaks.  Can you provide some code examples of how you’re creating your display objects and how you’re freeing them? Are you using Composer, our scene manager?

Rob

We are still using the old storyboard code Rob.  It was kind of built in to our project and taking it out was difficult.  Is Composer a big improvement on this as we would put the effort in if we thought it would make a big difference?

We are finding that when we have a runtime error the global error catching is firing and we navigate them to a screen that displays the error and lets the user report it to us…  However, on occasions some display objects are left behind. I think they may be related to network.request calls that are in flight after the error has called.

It is not a massive issue, but what I would like is if we do have an error and the user selects to Restart the App we really want that to mean a Restart (e.g. we clear anything down if anything is in memory).  Is there a way of cycling through a display object array and removing everything manually?

Hi rob,

Sorry for posting in this thread, I have an issue, I am creating a display.newText and i am inserting that in to a scroll View, instead of text i am seeing a white box. 

But when i remove it from the scroll view the text looks perfect.

local   myText = display.newText("yuuu", tempX - 50,textY ,self.fontNormal, 35 ) innerChatScrollView1:insert(myText) 

Hope i can find some solution. 

Why are you hi-jacking this thread?

@kumarks102, please start a new thread.

@matt405, Storyboard is fine. As long as your inserting your display objects into your storyboard view group, then removing the scene will clear it up.  

Are you downloading images and that’s where you’re catching the errors?