Gambas Documentation - /dev/api/name/gb.checkobject

/dev/api/name/gb.checkobject

# GB.CheckObject

int GB.CheckObject ( void *object )

Checks an object, i.e. asks the interpreter to check that the object reference is not null, to call the check class hook on this object, then to return the result.

- object is an object reference.

This function returns TRUE if the object is null or invalid. In that case, it calls GB.Error to define an explicit error.

Use this function each time you receive an object reference, and want to ensure that this reference is usable. Returns immediately if `GB.CheckObject` returns TRUE.

### See also

- Object Management