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

Home » Public Forums » archive » Re: On Pointers and Culture
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: On Pointers and Culture [message #42989 is a reply to message #42987] Fri, 04 March 2005 05:13 Go to previous messageGo to previous message
Antonio Santiago is currently offline  Antonio Santiago
Messages: 201
Registered: February 2004
Senior Member
> You also can do this to avoid the memory duplication:
>
> a = INDGEN(100)
> p = PTR_NEW(a,/NOCOPY)
>
> It's easier if you want to fill 'a' with some sort of complex data :)
>

Yes, but 'a' will be undefined with the /NO_COPY keyword:

IDL> .reset
IDL> a=INDGEN(100)
IDL> help, a
A INT = Array[100]
IDL> p=PTR_NEW(a, /NO_COPY)
IDL> help, a, p
A UNDEFINED = <Undefined>
P POINTER = <PtrHeapVar3>
IDL> help, /heap
Heap Variables:
# Pointer: 1
# Object : 0

<PtrHeapVar3> INT = Array[100]
IDL>


PD: I think you make me pretty familiar XD

Bye.
Antonio.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Arrays suck. Loops rock.
Next Topic: surface fitting...

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

Current Time: Wed Oct 15 02:03:12 PDT 2025

Total time taken to generate the page: 2.24560 seconds