Use dynamic memory allocation for model block instantiation - Whether to allocate dynamic memory for instantiating objects for reference models configured with C++ class interface - MATLAB (original) (raw)

Main Content

Whether to allocate dynamic memory for instantiating objects for reference models configured with C++ class interface

Model Configuration Pane: Code Generation / Interface

Description

The Use dynamic memory allocation for model block instantiation parameter specifies whether generated code uses the operator new, during model object registration, to instantiate objects for referenced models that are configured with a C++ class interface.

Dependencies

To enable this parameter, set:

Settings

Off (default) | On

On

Enables generation of code that uses dynamic memory allocation to instantiate objects for referenced models configured with a C++ class interface. During instantiation of an object for the top model in a model hierarchy, the generated code uses new to instantiate objects for referenced models.

Selecting this parameter frees a parent model from having to maintain information about referenced models beyond its direct children.

Off

Disables generation of code that uses new to instantiate referenced model objects.

If you clear this parameter, a parent model maintains information about its referenced models, including its direct and indirect children.

Application Setting
Debugging No impact
Traceability No impact
Efficiency On
Safety precaution No recommendation

Programmatic Use

Parameter: UseOperatorNewForModelRefRegistration
Type: character vector
Value: 'on' | 'off'
Default: 'off'

Version History

Introduced in R2009b