Well no i didn't use this, i got the math codes from a friend but you are right looks a bit similar..well I just can say that i haven't stolen it, but think what you want.
er, the anonymous poster was me. Anyways, you need to assign points into your locations. I noticed that when you created special effects, you use the position of the casting unit. Thats not good! Everytime you do that you create a leak, and you looped so many triggers like that over 60 times! That means you get about somewhere between 60-100 leaks per time you cast this. To fix the problem, you have to assign a variable to the position of the unit where you want to create the effect, then remove it later to prevent leaks.
Like one part for example. This is what you did.
For Loop Integer A - Loop Special Effect - Create Spfx at position of triggering unit offset by X Towards X angle.
That is an incorrect way, and everytime that looped, it would create a leak. The leak is unremovable!
If you assign a variable location, then you could clean it up later.
Example:
For Loop Integer A Set PointArray[x] = Position of Triggering Unit SpecialEffect - Create Special Effect at position of PointArray[x] offset by X Towards X angle. call RemoveLocation(udg_PointArray[x])
This would assign the PointArray[x] to your casters location. Then the Special effect would be created at the variable instead of the generic "triggering unit" location. Then, at the end, you could clear the PointArray thus preventing a leak!
Long and boring yes. Atleast you learned something....RIGHT!?