ImageGear for C and C++ on Windows v19.6 - Updated
IG_ISIS_tag_flush_value
API Reference Guide > ISIS Component API Reference > ISIS Component Functions Reference > Tag Functions > IG_ISIS_tag_flush_value

Release memory used by IG_ISIS_tag_save_value.  

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_ISIS_tag_flush_value(
        HISISDRV hDriver,
        AT_MODE nTag
);

Arguments:

Name Type Description
hDriver HISISDRV The handle to the driver.
nTag AT_MODE Specifies the tag that was saved and whose memory needs to be flushed. Specify a value of zero if you specified zero in the corresponding IG_ISIS_tag_save_value function.

Return Value:

Error count.

Supported Raster Image Formats:

This function does not process image pixels.

Remarks:

The IG_ISIS_tag_flush_value function releases the memory allocated by IG_ISIS_tag_save_value. Note that IG_ISIS_tag_restore_value automatically frees this memory.

Use IG_ISIS_tag_restore_value to free the memory used to store the value(s) saved when the application issued the most current IG_ISIS_tag_save_value call. Each call to IG_ISIS_tag_save_valuemust have a corresponding call to either IG_ISIS_tag_restore_value or IG_ISIS_tag_flush_value. This is a relatively new requirement, as multiple settings can now be saved in a stack. Previously, only one group of settings could be saved at a time, so only one call to IG_ISIS_tag_restore_valueor IG_ISIS_tag_flush_value was required.

The value of nTag should correspond to the value of nTag that was used when the corresponding IG_ISIS_tag_save_value was called. The values are saved in a last-in/first-out stack. By saving the settings of all tags multiple times, it is possible to implement a nested set of settings dialogs, one of which can be cancelled to restore original settings, even after accepting the settings in a previous one. (See IG_ISIS_tag_save_value.)

Example:

The following code fragment invokes IG_ISIS_tag_restore_value if the user chooses Cancel, or IG_ISIS_tag_flush_value if the user chooses OK:

 
Copy Code
switch (GET_WM_COMMAND_ID(wParam, lParam)) {
        case IDCANCEL:IG_ISIS_tag_restore_value(DriverP,0);
                if (hModeList) {free(hModeList);
                        hModeList = 0;
                }
                if (hWindowList) {free(hWindowList);
                        hWindowList = 0;
                }
                EndDialog(hDlg,IG_ISIS_ERR_CANCEL);
                return TRUE;
        case IDOK:IG_ISIS_tag_flush_value(DriverP,0);
                if (hModeList) {free(hModeList);
                        hModeList = 0;
                }
                if (hWindowList) {free(hWindowList);
                        hWindowList = 0;
                }

See Also

IG_ISIS_tag_restore_value

IG_ISIS_tag_save_value