Trait of objects that can report their memory usage.

interface MemoryUsage {
    getMemoryUsage(context, target?): MemoryUsageReport;

Implemented by


  • Returns an approximation of the memory used by this object, in bytes.


    • context: GetMemoryUsageContext

      The graphics context.

    • Optional target: MemoryUsageReport

      If specified, the values computed during this call must be added to the existing values in the target. Otherwise, a new report must be built.

    Returns MemoryUsageReport

    The memory usage report. If target is specified, then this must be returned.