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

Home » Public Forums » archive » Re: More efficient method of appending to arrays when using pointers?
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: More efficient method of appending to arrays when using pointers? [message #74166 is a reply to message #74164] Tue, 04 January 2011 14:44 Go to previous messageGo to previous message
natha is currently offline  natha
Messages: 482
Registered: October 2007
Senior Member
Try this:

temp = [ TEMPORARY(*self.foo),next_array ]
ptr_free,self.foo
self.free = ptr_new(temp,/NO_COPY)

When you are creating the new pointer you are duplicating memory.
The same occurs when you are retrieving the content of *self.foo. Use
the function TEMPORARY and the keyword NO_COPY, your code will be more
efficient.

Cheers,
nata
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to extract a scalar from a vector?
Next Topic: Re: Associating GeoTiFF tags with basic Mercator projection parameters?

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

Current Time: Sat Oct 11 15:15:59 PDT 2025

Total time taken to generate the page: 2.32098 seconds