Sign in to follow this  
Followers 0
Craig Hopson

Geolocation & memory leak

6 posts in this topic

hi all new day new problem... ok i THINK the problem i'm having is memory leak but not shore. my script logs user location as they move, if you look at

http://chsites.co.uk/track/www/index.html

Tracking ID = 97

Send at most every (sec) = 5

Minimum Accuracy (meters) = 100000

then open your debug console (i have some notes in there still debugging) you will see that it logs every 5 seconds all good it works BUT after some time it will lock up the browser and eventually crash it

also problem 2 it will post multi times like 3 times at once how can i stop that

so to recap...

problem 1:- browser locking up after some time.

problem 2:-multi posting.

Thanks

Share this post


Link to post
Share on other sites

Just looking at it quickly, it asked me if I wanted to share location every 5 seconds, it seems like after the interval period its running the whole script again.

Share this post


Link to post
Share on other sites

hmm not had that problem

Share this post


Link to post
Share on other sites

hmm not had that problem

Firefox, FWIW.

Share this post


Link to post
Share on other sites

For some more information:

https://developer.mozilla.org/en-US/docs/Using_geolocation

I believe using

window.setInterval(StartTracking...)[/CODE]

[size=4][font=arial,helvetica,sans-serif]Is your problem. watchPosition should run it's callback regularly already, but calling watchPostion through setInterval means Firefox will ask for permission each time.[/font][/size]

[size=4]I think, I haven't played with geolocation much.[/size]

Share this post


Link to post
Share on other sites

thanks i'll post back when i have played some more

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.