ITWissen.info - Tech know how online

Automatic object

The term automatic objects is related to object-oriented programming. The scope of automatic objects extends from the declaration to the end of the surrounding block, e.g. statement block, function, program.

For nested declarations of the same identifier, the binding of an identifier is always valid to the next encompassing declaration. Its lifetime goes from the execution of the definition until it leaves the scope. The constructor is called automatically. This behavior is the usual behavior in all block structured programming languages. Since here declaration is always connected with object creation, there is no danger with this form to use object identifiers without associated object or to be able to identify created objects no more.

Another form are the application controlled objects. Beside these two forms there are still mixed forms in object-oriented languages, which were developed from the C programming language.

Informations:
Englisch: Automatic object
Updated at: 07.12.2009
#Words: 142
Links: object (O), block, program, binding, lifetime
Translations: DE
Sharing:    

All rights reserved DATACOM Buchverlag GmbH © 2024