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

Home » Public Forums » archive » IDL objects (not object graphics) tutorial?
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: IDL objects (not object graphics) tutorial? [message #46614 is a reply to message #46457] Fri, 02 December 2005 07:46 Go to previous messageGo to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
dzarro@yahoo.com wrote:
> Hi,
>
> I have a tutorial at http://orpheus.nascom.nasa.gov/~zarro/idl/objects
> that I developed at NASA/GSFC.

Your webpage is great! The one new thing I learned:

self.ptr=ptr_new(/allocate)

can be used to subsequently point to anything without further allocation!? E.g. from your
tutorial:

a->set,image
or
a->set,!d

where in the set method, the value is simply assigned:
*(self.ptr)=value

Excuse my brain-deadedness, but how is this possible? I looked at the IDL docs but there
is (surprise, surprise) no elaboration about this little nugget of information regarding
PTR_NEW. Wouldn't susbsequent calls like the above cause a memory leak, e.g.

IDL> image=findgen(512,512)
IDL> a=obj_new('data') ;-- create object variable a
IDL> a->set,image ;-- insert image
IDL> a->set,!d

What would happen to the "image" data?

paulv

--
Paul van Delst
CIMSS @ NOAA/NCEP/EMC
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: map_proj_inverse and map_proj_init IDL 6.2
Next Topic: Data General Floating Point format?

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

Current Time: Thu Oct 09 08:08:44 PDT 2025

Total time taken to generate the page: 1.04093 seconds