void FontDisplayerPeerObject::decideToUnload(void) { if (streamCount == 0 && fhList.isEmpty()) { // This displayer can be unloaded. // I really want to do something like unloading the displayer // after say 1 min. because say the navigator moves from one page // to another and both had use for this displayer, then this displayer // will get loaded twice and unloaded once causing thrashing. // // The problem in implementing this is how to we ensure we get // back control after this many seconds. We should use the // FE Timer callback. // Clear any previous timers if (unloadTimerId) { FE_ClearTimeout(unloadTimerId); } // Set the new timer unloadTimerId = FE_SetTimeout(wf_unloadTimer, this, WF_ONE_MINUTE); } else { // Unload should not happen if (unloadTimerId) { FE_ClearTimeout(unloadTimerId); } } }
nsTopProgressManager::~nsTopProgressManager(void) { if (fDefaultStatus) { PL_strfree(fDefaultStatus); fDefaultStatus = NULL; } if (fURLs) { PL_HashTableDestroy(fURLs); fURLs = NULL; } if (fTimeout) { FE_ClearTimeout(fTimeout); fTimeout = NULL; } // XXX Needs to go to allxpstr.h FE_Progress(fContext, "Done."); }