one way I have solved (not elegant) is to listen on onunload event and remove the observer at that time.
If anyone has some better way, I would be very glad to know !!. ksachdeva wrote: > Hi, > > Here are some details about my XPCOM extension for firefox. > > 1- Scriptable XPCOM extension written in C++ > 2- XPCOM object spawns a thread for background task which is always > running unless > explicitly stopped. > 3- Background thread invokes the JavaScript functions using the > ObserverService as described in > http://groups.google.com/group/mozilla.dev.tech.xpcom/browse_thread/thread/c2d537ae8c3390eb/cd58cdc0ea094a67#cd58cdc0ea094a67 > > My question is how do I remove the observers when the current page goes > away (browser instance is not closed) and I am redirected to a new > page. > > Regards & thanks > Kapil _______________________________________________ dev-tech-xpcom mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-xpcom
