There's no equivalent to delvar in PDL, partly because Perl's memory
management is more sophisticated than IDL's and partly because PDL
variables can refer to on one another through the dataflow
mechanism. As Jarle says, "undef" is the closest equivalent, but it
will not actually release the memory if there are other variables
that still refer to the original. (Similarly, under UNIX or the Mac,
deleting a file from the file system won't free up any disk space if
there are still hard links pointing to it or programs using it).
To maks sure you don't have dataflow references floating around, you
can make sure you use "sever()" on any slices or indexed subfields
you take from your large variables.
Cheers,
Craig
On Nov 16, 2007, at 6:35 AM, Kåre Edvardsen wrote:
In IDL I think the command "delvar" or something completely removed
the spesific variable (value, array or whatever) and I think I came
over the same kind of thing with PDL, but I'm, not sure. Anyway, I
can't figure it out now.
Happy week-end,
Kare
On Fri, 2007-11-16 at 13:07 +0000, Jarle Brinchmann wrote:
I normally just set it to undef - the memory it uses is then
released.
Seemed to me the most 'Perly' way to do it.
J.
Kåre Edvardsen wrote:
> All the best,
> Kare
>
>
>
---------------------------------------------------------------------
---
>
> _______________________________________________
> Perldl mailing list
> [email protected]
> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl