| 03-21-2006, 09:27 PM | #2 |
Camera - Lock camera target for Player 1 (Red) to Rifleman 0001 <gen>, offset by (((X of TempPoint2) - (X of TempPoint1))... you are leaking location in Polar Projection... you must give it to point and destroy also |
| 03-21-2006, 10:24 PM | #3 |
Not sure about that... the offset takes a Real variable and the point's the offset uses are being destroyed. You sure it's leaking? |
| 03-22-2006, 05:04 AM | #4 |
Oh sry!!! I saw offset and thought its polar offset .... ignore my post!! |
| 03-22-2006, 11:55 AM | #5 |
JASS:function OffsetLocation takes location loc, real dx, real dy returns location return Location(GetLocationX(loc) + dx, GetLocationY(loc) + dy) endfunction Yep, that leaks. Because OffsetLocation returns a location, as can be seen above. |
| 03-22-2006, 12:51 PM | #6 |
I am genius! ;] so to avoid leaks, you need jass to call the function with not dynamically created variable. |
| 03-22-2006, 12:54 PM | #7 |
Just save it in a variable, like you did with the other values. Or, as Jacek said, you can use JASS and go straight for the gold with XY coordinates. |
| 03-22-2006, 05:00 PM | #8 |
Oh I do love it when Blizzard do really random things like this. Not much of a problem though. Nowhere near as confusing as making GUI not allow you to use orders via variables. |
| 03-22-2006, 07:03 PM | #9 |
Trigger: Camera - Lock camera target for Player 1 (Red) to Rifleman 0001 <gen>, offset by (((X of TempPoint2) - (X of TempPoint1)), ((Y of TempPoint2) - (Y of TempPoint1))) using Default rotation |
| 03-23-2006, 03:04 AM | #10 | |
Quote:
I could be wrong but I don't think it uses this function. The GUI action calls for a function that would have to return a real not a point, unless i'm not understanding it correctly. |
| 03-23-2006, 01:09 PM | #11 |
Yeah, I thought was using the offset function. Not camera offset |
| 03-23-2006, 02:29 PM | #12 |
I am not a genius? Damn... ![]() |
| 03-23-2006, 03:09 PM | #13 |
1) . Make sure it actually leaks. You need a memory monitor like task manager and also windowed mode so you could see the task manager while the game is active. 2) If it seriously leaks, try disabling the trigger and see if it still leaks, something else could be the real cause of the leaks. 3) If the trigger is the real cause , disable each of the functions until you find the one that is causing the leak -- why are you locking the camera target each 0.2 seconds? |
| 03-23-2006, 04:16 PM | #14 | ||||
Quote:
Massive difference in time for it to close after the game ended between a 10 second game and a minute game. Fairly sure it leaks. Quote:
This trigger and melee initialisation were the only triggers. Quote:
Mute point now, but it was either the setting of the variables (which shouldn't, as I destroyed them), or it was the locking to the offset. Probably the latter. Quote:
Because it was a hastily made test trigger to see if there was any point continuing, and I forgot that there was the offset by unit's rotation. Now no longer does that. Problem is solved, just wondering why the lock to offset should leak. |
| 03-23-2006, 07:32 PM | #15 |
only explanation is that it leaks natively (error by blizz programmer) |
