Home / lang / type / object 
Previous  Next  Edit  Rename  Undo  Refresh  Search  Administration   
fr  de  es  it  nl  pl  pt  pt_BR  mk  ca  ar  fa  vi  ja  ru  zh  zh_TW  eo 
Documentation
History
 
Object
Syntax
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.

See also

Datatypes