How do I Clear AJAX.LastData? [SOLVED]

Get help using Construct 2

Post » Wed Oct 01, 2014 1:37 pm

I'm sure I must be missing something obvious, but I haven't found an answer from searching the manual, tutorials or forms.
Last edited by simplisto on Wed Oct 01, 2014 2:15 pm, edited 1 time in total.
AVA ROWELL - simplisto.com - @avarowell - add me (simplisto) on Steam!
B
8
S
2
Posts: 23
Reputation: 1,138

Post » Wed Oct 01, 2014 1:45 pm

You usually don't have to, are you concerned about memory management ?
B
76
S
31
G
27
Posts: 1,015
Reputation: 20,790

Post » Wed Oct 01, 2014 1:55 pm

I'm loading data into two different arrays from two different CSV files. I had considered loading them both together into a single array, but I need to select random values from both meaning I'd have to add additional functions to split up the two randomised selections. This would be simple enough if the number of entries were fixed, but they aren't.
AVA ROWELL - simplisto.com - @avarowell - add me (simplisto) on Steam!
B
8
S
2
Posts: 23
Reputation: 1,138

Post » Wed Oct 01, 2014 2:02 pm

The data actually clear itself between different request, if it's what is concerning you.
B
76
S
31
G
27
Posts: 1,015
Reputation: 20,790

Post » Wed Oct 01, 2014 2:07 pm

I thought it would too (it being 'lastData' and all), but the previously loaded data remains and the lastData in added to the end.
AVA ROWELL - simplisto.com - @avarowell - add me (simplisto) on Steam!
B
8
S
2
Posts: 23
Reputation: 1,138

Post » Wed Oct 01, 2014 2:14 pm

Solved. The problem was with my second CSV file; I should have double checked it. Thanks for the help :)
AVA ROWELL - simplisto.com - @avarowell - add me (simplisto) on Steam!
B
8
S
2
Posts: 23
Reputation: 1,138

Post » Sat Apr 25, 2015 10:48 am

Let's say a relatively large textfile is requested via ajax. Does it make sense to clear the data by loading some small dummy data into the ajax data by requesting it to free up memory (not sure about how browsers go about reclaiming the memory thats unused ("garbage collection"))? How does the memory used up by the ajax.lastdata influence performance, especially on mobile devices?
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 788
Reputation: 3,788


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 24 guests