• Advertisement
Sign in to follow this  

a question about asBEHAVE_FACTORY

This topic is 3005 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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 ?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement