Home > lang > type > object 
 en fr de es it nl pl pt pt_BR mk sq ca hu cs tr ar fa id ko ja ru zh zh_TW eo
Previous  Next  Edit  Rename  Undo  Search  Administration  
Documentation  
Warning! This page is not translated.  See english version 
Object
DIM Var AS Object

This datatype represents an anonymous reference to a Gambas object.

Using anonymous references is slower than using references whose class is known at compilation time.

You create new object with the NEW keyword, or by using special instructions like OPEN that creates files, or EXEC and SHELL that creates processes.

Objects are automatically freed when they are not referenced anymore.

The freeing process is based on a reference counter stored in each object. There is no garbage collection in Gambas.

If you create a cross referencement, i.e. if an object A has a reference on an object B, that itself has a reference on A, then the objects will never be freed. In that case, you will get a "circular references" warning message at program exit.

See also

Datatypes