diff --git a/scripts/developer/debugging/QObjectWrapperGCTest.js b/scripts/developer/debugging/QObjectWrapperGCTest.js new file mode 100644 index 0000000000..4cfac22a63 --- /dev/null +++ b/scripts/developer/debugging/QObjectWrapperGCTest.js @@ -0,0 +1,19 @@ +// +// 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);