Plugin.ObjectCounts
-------------------

Returns JSON with object counts.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Plugin](component_Plugin.md) | [13.5](newinversion135.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "Plugin.ObjectCounts" { ; SkipZeros } ) 

**MBS**( **"Plugin.ObjectCounts";** /\* Returns JSON with object counts. \*/  
**$SkipZeros**) /\* Optional; Whether to skip zero values.  
Default is false. Pass 1 to skip.e.g. 0 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| SkipZeros | Whether to skip zero values.   Default is false. Pass 1 to skip. | 0 | Optional |

### Result

Returns JSON or error.

### Description

Returns JSON with object counts.  
If you wonder what is using up your memory, you can ask if the plugin has objects laying around, that you may have forgotten to release.  
The keys are different on macOS, Windows, Linux and iOS since some features don't exist on all platforms.  
### Examples

Query counters on macOS to find some SQL connections:

 MBS ("Plugin.ObjectCounts")  
<small>  
Example result:   
{ "AppleScript" : 0 , "AVAsset" : 0 , "AVExport" : 0 , "AVPlayer" : 0 , "AVRecorder" : 0 , "BinaryFile" : 0 , "Calendar" : 0 , "CFunction" : 0 , "CLGeocoder" : 0 , "CLibrary" : 0 , "CoreML" : 0 , "CURL" : 0 , "Dictionary" : 0 , "DNSLookup" : 0 , "DragDrop" : 0 , "DynaPDF" : 0 , "DynaPDFTable" : 0 , "ECKey" : 0 , "Email" : 0 , "EmailParser" : 0 , "Events" : 0 , "FMSQL" : 0 , "FSEvents" : 0 , "GMImage" : 0 , "HotKey" : 0 , "ImageSource" : 0 , "ImageView" : 0 , "JavaScriptEngine" : 0 , "JavaScriptMac" : 0 , "JObject" : 0 , "JSON" : 0 , "LDAP" : 0 , "MapView" : 0 , "MarkDown" : 0 , "Matrix" : 0 , "Menu" : 0 , "MenuItem" : 0 , "MetaDataQuery" : 0 , "Midi" : 0 , "Mongo" : 0 , "NamedMutex" : 0 , "PDFKit" : 0 , "Phidget" : 0 , "PKCS12" : 0 , "PKCS7" : 0 , "PKey" : 0 , "Preview" : 0 , "ProcessActivity" : 0 , "QuickList" : 0 , "RegEx" : 0 , "Schedule" : 0 , "SerialPort" : 0 , "Shell" : 0 , "SmartCard" : 0 , "Social" : 0 , "Socket" : 0 , "SQLCommand" : 0 , "SQLConnection" : 7 , "SSH" : 0 , "TextView" : 0 , "TouchBar" : 0 , "UNNotification" : 0 , "WebHook" : 0 , "WebRequest" : 0 , "WordFile" : 0 , "X509" : 0 , "XLBook" : 0 , "XML" : 0 } </small>### Release notes

- **Version 13.5**
    - Added [Plugin.ObjectCounts](https://www.mbsplugins.eu/PluginObjectCounts.shtml) and [Plugin.UsedFunctionCounts](https://www.mbsplugins.eu/PluginUsedFunctionCounts.shtml) function.

### Blog Entries

- [New in MBS FileMaker Plugin 13.5](https://www.mbsplugins.de/archive/2023-11-28/New_in_MBS_FileMaker_Plugin_13/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 13.5pr3](https://www.mbsplugins.de/archive/2023-10-11/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 13.5pr2](https://www.mbsplugins.de/archive/2023-10-02/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 27th September 2023 , last changed 2nd October 2023

  
[Plugin.LockedFunctions](PluginLockedFunctions.md) - [Plugin.OpenSSLVersion](PluginOpenSSLVersion.md)

[HTML Version](PluginObjectCounts.shtml)