cgDestroyObj
Keywords: cgDestroyObj, NVIDIA, NVIDIA Cg Toolkit, Cg Toolkit, Shader, Shader Programming, GPU Shader Programming, GPU Program

> ## Name

> cgDestroyObj - destroy an obj

> ## Synopsis

>     #include <Cg/cg.h>

>     void cgDestroyObj( CGobj obj );

> ## Parameters

> obj
>   The object to delete.

> ## Return Values

> None.

> ## Description

> cgDestroyObj removed the specified object and all its associated data.

> ## Examples

>     CGcontext ctx = cgCreateContext();
>     CGobj structObj = cgCreateObj(ctx, CG_SOURCE, src, CG_PROFILE_ARBVP1, NULL);

>     // Use obj, then ...

>     cgDestroyObj( structObj );

> ## Errors

> CG_INVALID_OBJ_HANDLE_ERROR is generated if obj is not a valid object handle.

> ## History

> cgDestroyObj was introduced in Cg 2.0.

> ## See Also

> cgCreateObj, cgCreateObjFromFile