Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Memory allocation functions

by cdarke (Prior)
on Feb 02, 2009 at 12:34 UTC ( [id://740677]=note: print w/replies, xml ) Need Help??


in reply to Memory allocation functions

There is! You can get memory as a scalar, an array, or a hash. Like so:
my $scalar; my @array; my %hash;
That memory is dynamic and managed by perl itself, so you don't need to remember to free it (usually) and you don't need to remember how much memory to allocate. Great isn't it!

Replies are listed 'Best First'.
Re^2: Memory allocation functions
by ph0enix (Friar) on Feb 02, 2009 at 15:54 UTC
    Yes, for sure. But please keep in mind that in case of complex data structures some circular references are not detected properly. In this case memory will still remain allocated.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://740677]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2024-07-20 11:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.