overte-Armored-Dragon/scripts/developer/debugging/QObjectWrapperGCTest.js
2023-05-19 00:17:41 +02:00

19 lines
672 B
JavaScript

//
// scriptMemoryReport.js
// scripts/developer/debugging
//
// Created by dr Karol Suprynowicz on 2023/04/23
// Copyright 2023 Overte e.V.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// SPDX-License-Identifier: Apache-2.0
//
// A simple script that prints memory usage statistics for a given script engine every 5 seconds
// It can be included for example as a part of default scripts or controller scripts
Script.setInterval(function () {
for (let i = 0; i < 50000; i++) {
let dbgobj = Script.createGarbageCollectorDebuggingObject();
}}, 10);