promotional bannermobile promotional banner

Smart Garbage Collector

Intelligent, lightweight Garbage collection tool

Smart Garbage Collector — Retirement Notice

After some reflection, I've decided to retire Smart Garbage Collector. The addon has served its purpose well, but with GarbageProtector now back under active development after an extended absence, there's no longer a need for a separate solution.

Going forward, I recommend switching to GarbageProtector as your replacement. It covers the same protection functionality and is now being actively maintained by its original author.

Smart Garbage Collector will be archived shortly. I won't be reviving or updating this project, so please make the switch at your convenience to ensure you continue receiving updates and patch compatibility going forward.

Thanks to everyone who used and supported the addon. It was a fun project while it lasted.

— Lollzer

Smart Garbage Collector

Lightweight memory management and GC protection for World of Warcraft

World of Warcraft uses Lua’s incremental garbage collector, which generally performs well. However, in add-on–heavy environments, poorly timed garbage collection or excessive memory queries from other add-ons can still cause noticeable stutters or frame drops.

Smart Garbage Collector helps smooth out those situations by managing when and how garbage collection occurs — without replacing or breaking WoW’s built-in behavior.

What This Add-on Does

✔ Controlled Incremental Garbage Collection

Instead of forcing full garbage collection cycles, Smart Garbage Collector:

  • Uses Lua’s incremental collectgarbage("step")

  • Runs small cleanup steps over time

  • Avoids stutters caused by large GC bursts

  • Adjusts aggressiveness automatically when needed

✔ Protection Against Wasteful GC Calls

Some add-ons trigger garbage collection or memory scans excessively. This add-on can:

  • Block external calls to collectgarbage()

  • Optionally block UpdateAddOnMemoryUsage()

  • Prevent repeated or unnecessary GC activity

  • Log which add-ons attempt these operations

This helps keep memory management predictable and avoids performance spikes caused by other add-ons.

Smart Safety Features

  • Skips cleanup during combat or loading screens

  • FPS-aware (avoids running when performance is already low)

  • Instance-aware (dungeons, raids, PvP, scenarios)

  • Prevents overlapping GC runs

  • Auto-adjusts behavior based on effectiveness

All GC activity is incremental and non-blocking.

Inspired by GarbageProtector

This add-on incorporates ideas originally introduced by GarbageProtector, which focused on blocking unsafe garbage collection calls.

Smart Garbage Collector builds on that idea by:

  • Adding controlled, step-based GC

  • Providing adaptive cleanup logic

  • Offering detailed reporting and configuration

Who This Is For

✔ Players with large add-on setups
✔ Users experiencing GC-related stutters
✔ Developers debugging memory behavior
✔ Anyone who wants smoother performance without manual cleanup

About CPU usage reports

Certain addon profilers (including older or continuously updating ones) measure cumulative execution time and can misattribute CPU usage, especially when many addons are installed.
Smart Garbage Collector performs small, periodic tasks which can accumulate in these reports without causing measurable performance impact.
Profilers that show per-frame timing or spike detection (e.g. Numy’s Addon Profiler) provide a more accurate picture of actual performance.

Slash Commands

/sgc – Open settings /sgc run – Run cleanup manually /sgc status – Show memory status /sgc enable – Enable automatic cleanup /sgc disable – Disable automatic cleanup 
 

Technical Summary

  • Uses Lua incremental GC (collectgarbage("step"))

  • Never forces full garbage collection

  • Blocks external GC and memory scan spam (optional)

  • Safe, lightweight, and configurable

  • Designed to cooperate with WoW’s native GC system

The Smart Garbage Collector Team

profile avatar
Owner
  • 1
    Followers
  • 5
    Projects
  • 12.0K
    Downloads

More from LozerView all

  • SilentLogin project image

    SilentLogin

    • 217
    • Addons

    Automatically mutes the character selection screen music, while keeping in-game music enabled

    • 217
    • May 3, 2026
    • Addons
    • +1
  • MountZoom project image

    MountZoom

    • 1.4K
    • Addons

    MountZoom automatically zooms your camera in or out when flying, swimming, or on a taxi and restores your normal zoom level when you land.

    • 1.4K
    • April 22, 2026
    • Addons
    • +2
  • EasyInterfaceOptions project image

    EasyInterfaceOptions

    • 972
    • Addons

    Easily change game settings that are usually hidden and not available in the default User interface.

    • 972
    • April 22, 2026
    • Addons
  • ActionBarTweakz project image

    ActionBarTweakz

    • 7.7K
    • Addons

    Take control of your action bars with this Ultra-lightweight add-on designed to enhance Blizzard’s default action bars.

    • 7.7K
    • April 22, 2026
    • Addons
  • SilentLogin project image

    SilentLogin

    • 217
    • Addons

    Automatically mutes the character selection screen music, while keeping in-game music enabled

    • 217
    • May 3, 2026
    • Addons
    • +1
  • MountZoom project image

    MountZoom

    • 1.4K
    • Addons

    MountZoom automatically zooms your camera in or out when flying, swimming, or on a taxi and restores your normal zoom level when you land.

    • 1.4K
    • April 22, 2026
    • Addons
    • +2
  • EasyInterfaceOptions project image

    EasyInterfaceOptions

    • 972
    • Addons

    Easily change game settings that are usually hidden and not available in the default User interface.

    • 972
    • April 22, 2026
    • Addons
  • ActionBarTweakz project image

    ActionBarTweakz

    • 7.7K
    • Addons

    Take control of your action bars with this Ultra-lightweight add-on designed to enhance Blizzard’s default action bars.

    • 7.7K
    • April 22, 2026
    • Addons