Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Error:Jerryscript out of memory

I have implemented multi-screens app all data we are getting from our server using fetch API . When I calling web API and getting a response then assigned to an array which is populated to Virtual-tile-list.

Its working fine when I calling web API 2-3 times. In each time I am reassigned array to latest one.

   ie: var info=[]

       info=responseData;

 

The app is crashing while calling API 4th time.

I don't know how to handle this issue.

Please guide me which approach I need to follow.

 

Best Answer
5 REPLIES 5

I'm wondering if it's the same problem(s) as here.

 

A concern I have is that SVG elements can't be deleted, so their memory can't be released and they will continue to hold references to whatever data they were populated with. If you reassign the variable in your code (as you are doing), perhaps that disassociates the SVG elements' data from your code (ie, what in info). At a stretch, I can see how this could result in an accumulation of stuff in memory.

 

Have you tried using the memory API to try to identify when the memory reduces?

 

I've had some limited success by removing data references in SVG elements before reassigning the data in my code. That way, the old data should be releasable when the memory garbage collector runs.

Peter McLennan
Gondwana Software
Best Answer
0 Votes

I've started getting this recently as well - same as you, using the Ionic Views system and when using virtual tile lists. I am populating the vtiles via reading in from a json file, and it would appear that me loading in my file of the tiles' content on one screen and then fairly quickly going back to another screen which loads in another file is overloading the memory limit.

 

I assumed it was just my mistake (and I know I can reduce the save files quite a bit...), so I was looking into optimisation tips on here the other night, but if a number of us are getting this recently when using this framework and SDK 3.0, I wonder if something has changed to catch us all out?

 

EDIT: Oh, I see in the linked thread above that's exactly what you're all suggesting there also 😉

Best Answer
0 Votes

@Gondwana

No i didn't use memory API to try to identify when the memory reduces please give me a memory api details so i can try it.

Best Answer
0 Votes
Best Answer
0 Votes

@Gondwana Thanks 🙂 

Best Answer