QMedical Command Reference
Images
|
|
| QMed_CloseImage(imageRef):error | |||
|
|
imageRef | Longint | Reference to the image |
|
|
error | Longint | Error result |
Destroys an image reference and releases all memory allocated to it.
The image reference to be destroyed is passed in imageRef.
As a rule, you should use this command after you have finished working with an image reference that was created with QMed_OpenImage.
Attention: The only exception is when the image reference was assigned to a QMedical plug-in area with the QMed_SetAreaImage command. In this case the image reference is "owned" by the plug-in area and it will be freed when the area is destroyed by 4D or when another command changes the area content.
Example
`Destroy the image reference C_LONGINT($error) C_LONGINT(gImageRef) $error:=QMed_CloseImage (gImageRef) If ($error # qmed_noErr) `Handle the errorEnd if |
Related commands
| QMed_OpenImage | Opens the image stored in a file |