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

Home » Public Forums » archive » Structure field concatenation
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: Structure field concatenation [message #21664 is a reply to message #21614] Wed, 06 September 2000 07:35 Go to previous messageGo to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Martin Schultz (martin.schultz@dkrz.de) writes:

> Only if you want
> to replace the data in a structure element, then you need to free
> the pointer beforehand:
>
> ;; Replace data of first structure
> IF Ptr_Valid(periodcube[0].freq) THEN Ptr_Free,
> periodcube[0].freq
> periodcube[0].freq = Ptr_New( DIndgen(200)*0.1 )

Actually, as I've been trying to point out for
months now to no avail, it is NOT necessary to
free the pointer in this instance. IDL *takes
care of the memory management for you*. :-)

IF Ptr_Valid(periodcube[0].freq) THEN $
*periodcube[0].freq = newThingy

Cheers,

David

P.S. I'm sure Martin knows this. He is just being
thorough. A trait I have noticed among Germans. :-)

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: IDLgrROI and normalized coords
Next Topic: Re: taking the widget plunge. help

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

Current Time: Wed Oct 08 15:27:36 PDT 2025

Total time taken to generate the page: 0.00444 seconds