View Single Post
11-23-16, 06:07 AM   #56
_Max_Cavalera_
A Fallenroot Satyr
 
_Max_Cavalera_'s Avatar
Join Date: Dec 2007
Posts: 28
If you checked the posts where we talked about it you probably know this.

Initially I started by using UNIT_INVENTORY_CHANGED, then i realized my mega tiny addon went from the initial 4kb memory to like 30kb (not instantly, I wasn't paying attention to it), I thought it was strange so I checked what was going on and it was UNIT_INVENTORY_CHANGED that was firing every time I mined and since I was farming mines, every mine it would go up and up and up.
Sure, eventually the garbage collection kicks in and down to 4 it goes, and yes, on something this size that's irrelevant but to me using something that fires for everything and their cousin instead of specific events that are in some way connected to what the addon does makes it bad practice.

This is probably Blizzard's mistake though, from everything said to me here and what I've read online, UNIT_INVENTORY_CHANGED shouldn't be firing for something like looting.

But yes, i think what you said about using it at start and unregister it is most probably the best solution, at least unless I find something I had no idea about (which wouldn't be strange xD).

Last edited by _Max_Cavalera_ : 11-23-16 at 08:02 AM.
  Reply With Quote