View Single Post
06-15-18, 05:39 PM   #1
thomasjohnshannon
A Theradrim Guardian
 
thomasjohnshannon's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 68
C_Map.GetPlayerMapPosition Memory Usage

Anyone else having memory issues with C_Map.GetPlayerMapPosition? I updated some map coords code to use the new functions and noticed that the addons memory usage grows every update. By commenting out other code I was able to narrow the problem down to this function so I know it is the problem. I had it setup like this.

Lua Code:
  1. local mapID = C_Map.GetBestMapForUnit("player")
  2. local px, py = C_Map.GetPlayerMapPosition(mapID, "player"):GetXY()

and also tried this.

Lua Code:
  1. local px, py = C_Map.GetPlayerMapPosition(C_Map.GetBestMapForUnit("player"), "player"):GetXY()

I also tried moving the variables outside of the function but nothing changed. Anyone know how to fix this. The addon worked with no issues with the old functions on live.
__________________
Thomas aka Urnn
  Reply With Quote