SizeOf

this function is experimentell, to not use in productive enviroment. this function returns the size in bytes of a given object.

Returns: any

Usage

SizeOf( obj [, complex ] )

Arguments

Argument Description
obj
(object, required)

object to get size for

complex
(boolean, optional)

if set to false, the size is returned, if set to true a struct containing the element count and the size is returned

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");