vlax-release-object (AutoLISP/ActiveX)

Releases a drawing object

Supported Platforms: Windows only

Signature

(vlax-release-object obj)
obj

Type: VLA-object

An object.

After release, the drawing object is no longer accessible through obj.

Return Values

Type: Integer or error

A numeric value if the object is successfully released; otherwise, an error occurs if the object is already released.

Remarks

When an AutoLISP routine no longer uses an object outside AutoCAD, such as a Microsoft Excel object, call the vlax-release-object function to make sure that the associated application closes properly. Objects released with vlax-release-object may not be released immediately. The actual release may not happen until the next automatic garbage collection occurs. You can call gc directly to force the garbage collection to occur at a specific location within your code. However, calling gc may degrade performance, and it is recommended that you avoid placing calls to gc in locations where it is likely to be called many times in a row, such as within loops.

If an object-associated application does not close after calling the gc function, the vlax-release-object function was not called for all objects outside AutoCAD.

Examples

N/A