A specific instance of an object class can be destroyed by the user, simply by dragging it over the Shredder object on the Workplace Shell desktop. If an object or application wishes to delete an object, it may do so using the WinDestroyObject() function, as shown in Figure "Destroying an Object".
The WinDestroyObject() function uses the object handle that is returned by the WinCreateObject() function. The object or application that creates the object is responsible for storing this handle during the existence of the object.
When an object is destroyed, the system invokes the object's _wpUnInitData method, which may be used to free any resources or instance data items that were allocated to that particular object.