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

Home » Public Forums » archive » yet another idl memory question
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: yet another idl memory question [message #66786 is a reply to message #66699] Mon, 08 June 2009 12:56 Go to previous messageGo to previous message
pgrigis is currently offline  pgrigis
Messages: 436
Registered: September 2007
Senior Member
On Jun 8, 3:05 pm, David Fanning <n...@dfanning.com> wrote:
> Paolo writes:
>>> Of course, data=3D0B doesn't free *all* the memory,
>>> and doing this many times leads, I suspect, to the memory
>>> fragmentation that is the heart of the problem. I suggest
>>> you use UNDEFINE. That really does release *all* the memory
>>> associated with a variable.
>
>> Really? Certainly it's not a substitute for ptr_free, is it?
>> At least not in my system:
>
> Well, I think you are confusing "variable", which is what
> I claim, with "pointer to a variable", which I admit UNDEFINE
> doesn't free. (I think it was written *before* pointers, to
> tell you the truth!)

Well, for me pointers are just another kind of variables :)

In fact, I don't think IDL has anything like classic
"pointers to variables": pointers are just references to
data in memory (similar to regular variabes), because a
command such as ptr_new(A) just duplicate the contents of A
to a new memory location, so there is no such a thing as a
true pointer to variable A, right?

Ciao,
Paolo

>
> But in any case, easily fixed. Just test to see if the
> variable is a pointer or object, destroy it if so, and
> carry on undefining the variable.
>
> Maybe I'll get around to it later today. :-)
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Coyote's Guide to IDL Programming (www.dfanning.com)
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: 4 byte integers
Next Topic: idl encoder/decoder of json

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

Current Time: Fri Oct 10 05:09:14 PDT 2025

Total time taken to generate the page: 0.47954 seconds