Advertisement

Are script-class member variables initialized automatically?

Started by March 13, 2014 05:49 AM
0 comments, last by ThyReaper 10 years, 8 months ago

If I have a script class which has member variables which are handles to app-registered types, and I don't explicitly initialize them in the declaration or in the ctor, should they be automatically initialized to null?

For example:


class MyScriptClass
{
    private MyAppClass@ someHandle;
}

Thank you.

Handles are default-initialized to null. Other primitives are not default initialized. All other types use their default constructor, which could also be no initialization for POD types registered by the application.

This topic is closed to new replies.

Advertisement