SizeOf()
This function is experimental, do not use in a production environment. This function returns the size in bytes of a given object.
SizeOf( obj=object, complex=boolean );
Returns: any
Examples
// Measuring size of application variables and dumping the content to screen
qSize = queryNew("key,size");
for (key in application) {
qSize.addRow();
qSize.setCell("key", key, qSize.recordCount);
qSize.setCell("size", sizeOf(application[key]), qSize.recordCount);
}
qSize.sort("size", "desc");
dump(var=qSize, label="Size of all keys in application scope");
See also
- Debugging
- Search Issue Tracker
- Search Lucee Test Cases (good for further, detailed examples)