Quantcast Function: UnloadAddOn - WoWInterface
Thread Tools Display Modes
04-06-09, 08:47 AM   #1
Soeters
A Warpwood Thunder Caller
 
Soeters's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 97
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.
__________________
  Reply With Quote
04-06-09, 11:06 AM   #2
Tristanian
Andúril
Premium Member
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 279
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
__________________
  Reply With Quote
04-06-09, 11:19 AM   #3
Slakah
A Molten Giant
 
Slakah's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2007
Posts: 863
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.
  Reply With Quote
04-06-09, 02:28 PM   #4
dafire
Premium Member
AddOn Author - Click to view addons
Join Date: Jun 2005
Posts: 216
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
  Reply With Quote
04-06-09, 03:30 PM   #5
jaliborc
A Chromatic Dragonspawn
 
jaliborc's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2007
Posts: 196
Originally Posted by dafire View Post
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.
  Reply With Quote
04-06-09, 03:42 PM   #6
Slakah
A Molten Giant
 
Slakah's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2007
Posts: 863
Originally Posted by dafire View Post
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.
  Reply With Quote
04-06-09, 11:42 PM   #7
Tekkub
Featured Artist
 
Tekkub's Avatar
Featured
Join Date: Dec 2005
Posts: 960
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
  Reply With Quote

WoWInterface » Developer Discussions » Wish List » Function: UnloadAddOn

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off