Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
JS.StringCount
Queries global string counter.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
JavaScript | 10.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "JS.StringCount"; JSRef ) More
Parameters
Parameter | Description | Example |
---|---|---|
JSRef | The JavaScript reference number. | $js |
Result
Returns number or error.
Description
Queries global string counter.A fresh JavaScript engine already has about 1000 strings.
Examples
Query memory statistics:
Set Variable [ $JS ; Value: MBS( "JS.New" ) ]
Show Custom Dialog [ "JavaScript memory statistics:" ; MBS( "JS.StringCount"; $JS ) & " strings" & ¶ & MBS( "JS.ObjectCount"; $JS ) & " objects" ]
See also
Release notes
- Version 10.1
- Added JS.ObjectCount and JS.StringCount functions.
Blog Entries
This function checks for a license.
Created 31st January 2020, last changed 19th April 2020