a question about asBEHAVE_FACTORY

Started by
0 comments, last by WitchLord 14 years, 4 months ago
gentlemen: I have a feeling that asBEHAVE_FACTORY is similar to asBEHAVE_CONSTRUCT, what is the difference of asBEHAVE_FACTORY with asBEHAVE_CONSTRUCT? who can give me an example ?
Advertisement
The factory is to reference types what the constructor is to value types.

The biggest difference is that the factory is responsible for allocating and initializing the memory for the object, whereas the constructor is only responsible for initializing the memory already allocated elsewhere.

Regards,
Andreas

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

This topic is closed to new replies.

Advertisement