comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: delete variable name from memory
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: delete variable name from memory [message #44261 is a reply to message #44259] Thu, 02 June 2005 09:30 Go to previous messageGo to previous message
Antonio Santiago is currently offline  Antonio Santiago
Messages: 201
Registered: February 2004
Senior Member
saplizki@gmail.com wrote:
> I need to delete my variable from the variable name list.
> but i don't locate at the top level (i'm in a gui program) so i can't
> 'delvar' it.
> also i can't (don't want to) zero it because it won't remove from the
> variable list (when i press help or use ROUTINE_NAMES or ROUTINE_INFO)
> and i use that list at my program.
>

Another way to undefine a variable different from David's solution is
with pointers:

IDL> .reset
IDL> a=10
IDL> help
% At $MAIN$
A INT = 10
Compiled Procedures:
$MAIN$

Compiled Functions:

IDL> PTR_FREE, PTR_NEW(a, /NO_COPY)
IDL> help
% At $MAIN$
A UNDEFINED = <Undefined>
Compiled Procedures:
$MAIN$

Compiled Functions:

IDL> ...


The important thing is PTR_NEW(a, /NO_COPY) creates a copy of 'a' into
the HEAP memory and undefines 'a' (with NO_COPY keyword) and returns a
pointer variable that "points" to the HEAP memory. Then we free this
pointer variable.

Also, I suposse (better I'm sure) David's solution is much more good
than this because he use the TEMPORARY function that is desigend for a
similar use that you need.

Bye.

--
-----------------------------------------------------
Antonio Santiago P�rez
( email: santiago<<at>>grahi.upc.edu )
( www: http://www.grahi.upc.edu/santiago )
( www: http://asantiago.blogsite.org )
-----------------------------------------------------
GRAHI - Grup de Recerca Aplicada en Hidrometeorologia
Universitat Polit�cnica de Catalunya
-----------------------------------------------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: goetiff reading routine for idl 5.1
Next Topic: Re: C/C++ conversion to IDL

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 06:13:50 PDT 2025

Total time taken to generate the page: 1.20586 seconds