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

Home » Public Forums » archive » TEMPORARY (was Re: Fragmented memory with IDL)
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
TEMPORARY (was Re: Fragmented memory with IDL) [message #1038] Fri, 21 May 1993 14:24
jdlb is currently offline  jdlb
Messages: 11
Registered: July 1992
Junior Member
thompson@serts.gsfc.nasa.gov (William Thompson) writes:
> Another way to avoid memory fragmentation is to use the TEMPORARY function
> where appropriate.

The TEMPORARY function can be useful, but caution is required as TEMPORARY
*deletes* the original array. Thus,
IDL> a = temporary(a) + 1
adds 1 to A using a minimum of memory, but
IDL> b = temporary(a) + 1
creates B while destroying A. This may be obvious to others, but it burned me
the first time.

TEMPORARY, whose effects are PERMANENT, might perhaps be more aptly named
COPY_AND_DELETE. :^)

Regards,
Jeff

% Jeff de la Beaujardiere % jdlb@mamane.ifa.hawaii.edu %
% Institute for Astronomy % 808-956-9843 %
% University of Hawai`i % fax 956-9402 %
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: PVW or IDL?
Next Topic: Re: TEMPORARY (was Re: Fragmented memory with IDL)

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

Current Time: Thu Oct 09 06:45:13 PDT 2025

Total time taken to generate the page: 1.12092 seconds