开发者

Do I've to set variable to null always in AS3 OOP?

I've a question about variables in AS3 OOP开发者_开发技巧. Do I have to set them to null or I it's not needed when I define them in beginning of the class? I just noticed someone doing so so I wasn't sure is it right or no.

private var _mcComponentHolder:MovieClip = null;
private var _mcComponentHolder:MovieClip; 

Thanks in advance!


I think either of those is fine. I've never bothered declaring it as null.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜