GetAddOnMemoryUsage
Jump to navigation
Jump to search
Returns the memory used for an addon.
mem = GetAddOnMemoryUsage(name)
Arguments
- name
- string|number - The name of the addon to be queried, or an index from 1 to GetNumAddOns. The state of Blizzard addons can only be queried by name.
Returns
- mem
- number - Memory usage of the addon in kilobytes.
Details
- This function returns a cached value calculated by UpdateAddOnMemoryUsage()
- This function will raise an error if a secure Blizzard addon is queried.
Example
Prints the memory usage for all addons.
UpdateAddOnMemoryUsage()
for i = 1, GetNumAddOns() do
local name = GetAddOnInfo(i)
print(GetAddOnMemoryUsage(i), name)
end
Patch changes
Patch 10.1.0 (2023-05-02): Will now raise an error if a secure addon is queried.