Jump to content

wpFree

From EDM2

This instance method is called to destroy the object, including its persistent image, and de-allocate its associated resources.

Syntax

_wpFree(somSelf)

Parameters

somSelf (WPObject *) - input
Pointer to the object on which the method is being invoked.
Points to an object of class WPObject.

Returns

rc (BOOL) - returns
Success indicator.
TRUE: Successful completion.
FALSE: Error occurred.

Remarks

This method destroys the persistent form of the object and then frees the memory that represented that object. If confirmations are on, wpDelete prompts the user before calling wpFree. After a call to this method, the 'self' pointer is no longer valid.

Usage

General destruction of an object should be done with the wpDelete method. This method is generally called only by the system.

How to Override

This method is generally overridden by storage classes that permanently remove this object and its associated data or any objects that need to do special processing before deletion. The parent method must be called after the processing that is done by the overriding method.

Example Code

#define INCL_WINWORKPLACE
#include <os2.h>

WPObject      *somSelf;        /* Pointer to the object on which the method is being invoked. */
BOOL          rc;              /* Success indicator. */

rc = _wpFree(somSelf);

Related Methods