Quantcast Memory Leak ? - WoWInterface
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
05-02-17, 12:14 AM   #1
gmarco
A Frostmaul Preserver
 
gmarco's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 290
Memory Leak ?

Hi all,

I was doing a simple LDB to hide the class order bar for not be shown under docking station.
But I miss something to show a panel so I make it as LDB launcher.

I thought to fill the LDB tooltip at least with a missions report so I write something like this:

Lua Code:
  1. function dataobj.OnTooltipShow(tooltip)
  2.     tooltip:AddLine(ADDON)
  3.     tooltip:AddLine(" ")
  4.     tooltip:AddLine("Missions",1,1,1,1)
  5.  
  6.         -- [ blabla ]
  7.    
  8.         local mis_avl = #C_Garrison.GetAvailableMissions(LE_FOLLOWER_TYPE_GARRISON_7_0)
  9.         local mis_pro = #C_Garrison.GetInProgressMissions(LE_FOLLOWER_TYPE_GARRISON_7_0)
  10.         local mis_fin = #C_Garrison.GetCompleteMissions(LE_FOLLOWER_TYPE_GARRISON_7_0)
  11.  
  12.         -- [ blabla ]
  13.  
  14. end

Now the problem. Is possible this make this addon MEMORY USAGE grows everytime I hover on the LDB ?




Lua Code:
  1. local mis_avl = #C_Garrison.GetAvailableMissions(LE_FOLLOWER_TYPE_GARRISON_7_0)
  2. local mis_pro = #C_Garrison.GetInProgressMissions(LE_FOLLOWER_TYPE_GARRISON_7_0)
  3. local mis_fin = #C_Garrison.GetCompleteMissions(LE_FOLLOWER_TYPE_GARRISON_7_0)
The problem are these lines... If I removed them everything is fine again.

Should I use a frame with an event like:
GARRISON_UPDATE

To calc them and not the OnTooltipShow of the LDB ?

Thanks to anyone.
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Memory Leak ?

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