| 04-11-2007, 06:00 AM | #1 |
JASS:
struct stb
sta H=0
sta K=0
method onDestroy takes nothing returns nothing
if (H!=0) then
call sta.destroy(H)
endif
if (K!=0) then
call sta.destroy(K)
endif
endmethod
endstruct
Cus i just want a constructor, but dont like this to be called if the object isnt destroyed |
| 04-11-2007, 07:03 AM | #2 |
Just wondering... Is this an actual question, or do you know the answer but you want to see how much we cooperate? lol... I don't entirely understand what your trying to do, me being a JASS beginner of a beginner... :) |
| 04-11-2007, 07:36 AM | #3 |
this isny really jass, its a preprocessor syntax. Im asking vex tbh. Just wanna know if im allowed to use private on onDestroy functions |
| 04-11-2007, 12:41 PM | #4 |
onDestroy could be used from outside as a cleanup procedure. nothing stops you from adding the private keyword to the declaration. |
| 04-11-2007, 01:23 PM | #5 |
ok thnx, i think private makes the cleanup syncronise with the destroy more. So people dont run cleanups without destroying the object |
