;+ ; NAME: ; RemoteView_Destroy_FOV ; PURPOSE: ; Clean up heap variables ; CATEGORY: ; RemoteView package ; CALLING SEQUENCE: PRO RemoteView_Destroy_FOV, FOVInfo ; INPUTS: ; FOVInfo array; type: structure ; array of FOVInfo structures ; OUTPUTS: ; (none> ; INCLUDE: @compile_opt.pro ; On error, return to caller ; PROCEDURE: ; Destroy heap variables associated with FOVInfo.view_elo and FOVInfo.matrix ; The FOVInfo structure contains three pointers to heap variables. ; FOVInfo.view_elo always needs to be cleared. ; FOVInfo.matrix and FOVInfo.matrixb only need to be cleared if they point ; to an interpolated matrix (see href=RemoteView_Init_FOV=). ; MODIFICATION HISTORY: ; JULY-2001, Paul Hick (UCSD/CASS) ; JULY-2002, Paul Hick (UCSD/CASS; pphick@ucsd.edu) ; Updated to handle pointer to magnetic field. ;- FOR i=0,n_elements(FOVInfo)-1 DO BEGIN ptr_free, FOVInfo[i].view_elo IF FOVInfo[i].matrix_extra THEN ptr_free, FOVInfo[i].matrix IF FOVInfo[i].matrixb_extra THEN ptr_free, FOVInfo[i].matrixb ENDFOR RETURN & END