mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 04:41:36 +08:00
remove gc call (#2848)
This commit is contained in:
@ -7,27 +7,6 @@ import * as animationModule from "ui/animation";
|
|||||||
import lazy from "utils/lazy";
|
import lazy from "utils/lazy";
|
||||||
import trace = require("trace");
|
import trace = require("trace");
|
||||||
|
|
||||||
let idleGCHandler;
|
|
||||||
let scheduledGC = false;
|
|
||||||
function scheduleGCOnIdle() {
|
|
||||||
if (!idleGCHandler) {
|
|
||||||
idleGCHandler = new android.os.MessageQueue.IdleHandler({
|
|
||||||
queueIdle: function () {
|
|
||||||
gc();
|
|
||||||
scheduledGC = false;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!scheduledGC) {
|
|
||||||
android.os.Looper.myQueue().addIdleHandler(idleGCHandler);
|
|
||||||
scheduledGC = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return idleGCHandler;
|
|
||||||
}
|
|
||||||
|
|
||||||
let slideTransition: any;
|
let slideTransition: any;
|
||||||
function ensureSlideTransition() {
|
function ensureSlideTransition() {
|
||||||
if (!slideTransition) {
|
if (!slideTransition) {
|
||||||
@ -443,8 +422,6 @@ function _completePageRemoval(fragment: any, isBack: boolean) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
entry.isNavigation = undefined;
|
entry.isNavigation = undefined;
|
||||||
|
|
||||||
scheduleGCOnIdle();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function _removePageNativeViewFromAndroidParent(page: Page): void {
|
export function _removePageNativeViewFromAndroidParent(page: Page): void {
|
||||||
|
Reference in New Issue
Block a user