Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^3: what is difference between calling the function in Perl/Tk in the following ways

by choroba (Cardinal)
on Apr 16, 2010 at 15:02 UTC ( [id://835117]=note: print w/replies, xml ) Need Help??


in reply to Re^2: what is difference between calling the function in Perl/Tk in the following ways
in thread what is difference between calling the function in Perl/Tk in the following ways

Both these two would leak, I fear. The only safe way is to call
-command=>[\&function,\$arg1,\$arg2]
  • Comment on Re^3: what is difference between calling the function in Perl/Tk in the following ways
  • Download Code

Replies are listed 'Best First'.
Re^4: what is difference between calling the function in Perl/Tk in the following ways
by ikegami (Patriarch) on Apr 16, 2010 at 15:16 UTC

    By adding \$arg1,\$arg2, the memory leak goes away? I don't think so.

      Not only by adding the references, but also by including them into a list instead of using them directly. We tested it hundred times, really.
        That would be awesome, except you seem to have forgotten to post the test.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-19 03:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found