| 05-18-2008, 11:53 PM | #1 |
Is it necessary to clear a variable before overwiting it? For example I usually make a unit group but I sometimes overwrite this variable in the same trigger. Is there no effect or do I have to start nulling them Thanks! |
| 05-19-2008, 01:04 AM | #2 |
The only place in which you arguably need to null something is before a function ends. |
| 05-19-2008, 12:32 PM | #3 | |
Quote:
|
| 05-19-2008, 05:47 PM | #4 |
thanks another question - Is it okay for me to leave variables uncleared if i plan to overwrite them in other triggers. (GUI) What is the effect on memory if I do this? the triggers activate very often and keeps reusing the variables |
| 05-19-2008, 06:36 PM | #5 |
Yes reusing variables is very good, no need for nulling than. Just don't forget to clean leaks. |
| 05-19-2008, 07:06 PM | #6 |
thanks. Just what I needed =D |
