Does this leak?

Discussion in 'World Editor Help' started by afisakov, Sep 3, 2017.

  1. afisakov

    afisakov You can change this now in User CP.

    Ratings:
    +38 / 0 / -0
    local real y= GetLocationY(GetSpellTargetLoc())
    jasschecker seemed to flag it, but I thought getting the x or y coordinate of something did not leak?
    asking here to make sure
     
  2. Accname

    Accname 2D-Graphics enthusiast

    Ratings:
    +1,549 / 4 / -4
    Yes, it leaks.
    Every function (as far as I know) which returns a Point will leak. GetSpellTargetLoc() returns a point; this point must be destroyed after it has been used.
     
    • Informative Informative x 1
  3. afisakov

    afisakov You can change this now in User CP.

    Ratings:
    +38 / 0 / -0
    Thank you for the prompt reply.
    Looks like I have some leaks to fix now
     

Share This Page