Constructor
Article Metadata
Constructor creates an object and initializes it. It also creates vtable for virtual functions. It is different from other methods in a class.
Some Important facts about Constructor in Symbian:
- Never leave from a C++ constructor.
- Never allocate memory from within a C++ constructor.
- Put construction functions that might leave into a second-phase constructor such as ConstructL().
- Instead of expecting your user to call ConstructL() and/or a C++ constructor explicitly, use NewL() and NewLC() to wrap up allocation and construction. You can enforce this by making the C++ constructors private.


(no comments yet)