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

Home » Public Forums » archive » losing pointers when concatenating array of structures
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: losing pointers when concatenating array of structures [message #94053 is a reply to message #94052] Mon, 09 January 2017 11:05 Go to previous messageGo to previous message
Jim  Pendleton is currently offline  Jim Pendleton
Messages: 165
Registered: November 2011
Senior Member
On Monday, January 9, 2017 at 9:44:30 AM UTC-7, Edward Hyer wrote:
> On Monday, January 9, 2017 at 2:09:58 AM UTC-8, Heinz Stege wrote:
>> Well, pointers are tricky sometimes. I will try to explain.
>
> That is a good answer, thank you Heinz. So here's a question: what if I want to make a *copy* of a structure-containing-pointers, creating new heap variables for all the pointers in the structure? Maybe this cannot be done automatically? This is the problem that had me searching the IDL help for a STRUCT_COPY procedure.

A quick trick for making a *deep copy* is to SAVE the structure to an output file, then RESTORE the data, making sure you don't accidentally overwrite your original variable when you restore.

All included heap variable references (as well as all their dependencies) will be duplicated.

If you need a procedure that is not as deep, you will need to write your own logic. In ENVI, this is accomplished through dehydrate/rehydrate techniques.

Jim P.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Mismatch between video frame dimensions and stream using Coyote graphics
Next Topic: how to overplot a vertical line in the existing plot made using plot function?

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

Current Time: Sat Oct 11 13:49:38 PDT 2025

Total time taken to generate the page: 1.27943 seconds