Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Memory usage of array and hashe variables by multiple inclusion.

by kcott (Chancellor)
on Jul 02, 2013 at 11:25 UTC ( #1041999=note: print w/replies, xml ) Need Help??


in reply to Memory usage of array and hashe variables by multiple inclusion.

G'day tobias_hofer,

"Can modules be loaded several times?"

require says:

require demands that a library file be included if it hasn't already been included.

and use says:

It is exactly equivalent to

BEGIN { require Module; Module->import( LIST ); }

So, assuming you're using use or require to load the modules, the answer's no.

You may find Test::LeakTrace helpful.

-- Ken

Replies are listed 'Best First'.
Re^2: Memory usage of array and hashe variables by multiple inclusion.
by tobias_hofer (Friar) on Jul 02, 2013 at 11:31 UTC
    Hello Ken,

    Thanks a lot!
    So I can exclude this as root-cause of the memory consumption.
    ;-)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (8)
As of 2018-11-13 22:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My code is most likely broken because:
















    Results (159 votes). Check out past polls.

    Notices?