Requirement
ObjectARX applications
Because AutoCAD has limited resources to share among the applications it runs, it is important to free any resources allocated for you when they are no longer required. Examples include iterators, temporary objects, and strings and arrays of various types returned from APIs. The API documentation specifies when it is the caller's responsibility to destroy resources allocated during the call.
If a contract is specified in the documentation, you should adhere to it. For example, no modal dialogs should result from a worldDraw() call.