Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^7: "goto" memory leak

by Anonymous Monk
on Mar 31, 2016 at 14:36 UTC ( #1159205=note: print w/replies, xml ) Need Help??


in reply to Re^6: "goto" memory leak
in thread "goto" memory leak

If it's any easier, think of my as malloc(). Inside a while loop, the my variable goes out of scope each iteration, so the storage may be reclaimed. To get the same effect with a goto loop, you'll need explicit block scoping:

again: { my $h; } goto again;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2020-07-06 03:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?