QPx_FreeImporter
QPx_FreeImporter(importerRef):error | |||
---|---|---|---|
![]() |
importerRef | Longint | Reference to the importer instance to be destroyed |
![]() |
error | Longint | Error result |
Destroy an existing importer instance
The importer instance to be destroyed is passed in importerRef.
As a rule, you should use this command when done working with a graphics importer instance that was created with one of the importer creation commands (QPx_NewImporterForFile, QPx_NewImporterForData, QPx_NewImporter, etc), in order to free up the memory occupied by the importer.
The only exception is when the importer instance has been assigned to a QPix area with the QPx_SetAreaImporter command. In this case the importer instance is "owned" by the area and will be destroyed either together with the area by 4D, or when another command will change the content of the area.
ATTENTION Calling QPx_FreeImporter with an importer owned by a QPix area, will generate an error.
Example
// Free the importer C_LONGINT($error) C_LONGINT(gQPixImporter) $error:=QPx_FreeImporter (gQPixImporter) If ($error#qpx_noErr) // Handle the error End if
Related commands
QPx_NewImporter | Create a graphics importer instance without image data |
QPx_NewImporterForFile | Create a graphics importer instance for the image stored in a file |
QPx_NewImporterForData | Create a graphics importer instance for the image data stored in a BLOB |
QPx_NewImporterForURL | Create a graphics importer from a URL |
QPx_NewImporterForPict | Create a graphics importer instance for the image data in a picture variable |
QPx_SetAreaImporter | Assign a graphics importer instance to a QPix area |