Home > dev > api > name > gb.new 
 en fr de es it nl pl pt pt_BR mk sq ca hu tr ar fa id vi ko ja ru zh zh_TW eo
Previous  Next  Edit  Rename  Undo  Search  Administration  
Documentation  
Warning! This page is not translated.  See english version 
GB.New
int GB.New ( void **object , const char *class , const char *name , void *parent )

Creates a new object given its class name.

The name and parent arguments can be null. In that case, the object will not have any event observer.

This function can create objects whose class has been explicitely declared not instanciable.

If the class is instanciable, this function has exactly the same effect as using the NEW instruction in the Gambas program.

The new object has an initial reference count of zero. So you must reference it you need to keep it. This is not necessary if you return the object immediately with GB.ReturnObject.

See also

api/cat/object