WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Wish List (https://www.wowinterface.com/forums/forumdisplay.php?f=15)
-   -   Function: UnloadAddOn (https://www.wowinterface.com/forums/showthread.php?t=21780)

Soeters 04-06-09 08:47 AM

Function: UnloadAddOn
 
Many LoD addons are options frames so they don't need to be loaded all the time once we loaded it to change an option.
For the LoD addons we can use LoadAddon be when the addon is loaded there is no way to "unload" it so a similar function UnloadAddOn(index or "name") would be a good function for the CPU usage.

Tristanian 04-06-09 11:06 AM

Actually, unless your configuration options are doing something really obscure in the background or are interacting badly with another addon, there shouldn't be any significant impact, in terms of CPU time, assuming you aren't tampering with the options all the time. Granted, your UI will use more memory perhaps without good reason, but memory usage has become largely irrelevant, assuming your machine is powerful enough to handle Wotlk without many issues and your addons are not "leaking" due to bad coding.

It also depends on the size of your config LoD addon. That being said, a way to unload an addon could be quite useful regardless ;)

Slakah 04-06-09 11:19 AM

It would be very difficult to do, as the LoD addon has free rain to muck about with whatever it feels like. Plus it's already pretty much possible through the garbage collector by basically nilling out all references, removing all SetScripts and performing collectgarbage("collect").I think the only thing which can't be removed are frames.

dafire 04-06-09 02:28 PM

Why would an addon with no active frames use any cpu ?

I don't even see the advantage in seperate config addons anymore.. since you can create the config frames only when you need them anyways .9

jaliborc 04-06-09 03:30 PM

Quote:

Originally Posted by dafire (Post 124573)
Why would an addon with no active frames use any cpu ?

I don't even see the advantage in seperate config addons anymore.. since you can create the config frames only when you need them anyways .9

No need to load the functions which create the config frames before they are really necessary.

Slakah 04-06-09 03:42 PM

Quote:

Originally Posted by dafire (Post 124573)
I don't even see the advantage in seperate config addons anymore.. since you can create the config frames only when you need them anyways .9

Load times and memory usage. Waiting a minute to get into the game for the luxury of options with a GUI is not fun.

Tekkub 04-06-09 11:42 PM

You see there's this bowl of soup...

A well designed config frame will not generate anything more than a single empty frame and a single function on load, both of which take very little time to do. The work is offloaded for when the frame is first displayed. There is no reason to put it in a LoD addon and there's no reason to unload it after it's loaded


All times are GMT -6. The time now is 08:16 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI