Show Table of Contents
11.6. Writing a Destructor Function
The server calls the destructor function to free any memory that was allocated; for example, to the indexer object or the filter object.
The destructor function takes a single Slapi_PBlock argument. The following table summarizes the different parameters that the destructor function should get and set in the parameter block that is passed in.
Table 11.6. Input and Output Parameters Available to a Destructor Function
| Parameter Name | Data Type | Description |
|---|---|---|
SLAPI_PLUGIN_OBJECT | void * | Input parameter. Pointer to the filter object or indexer object created by your factory function. |
For example, your destructor function can get the indexer object from the
SLAPI_PLUGIN_OBJECT parameter and free the object from memory.
This function will never be called for the same indexer or filter object concurrently. (If you plan to manipulate global variables, remember that the server can call this function concurrently for different filter or indexer objects.)

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.