Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

leaking scalars

by Anonymous Monk
on Sep 13, 2000 at 22:46 UTC ( [id://32313]=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I am writing a perl script that handles the transfer and manipulation of data up and down from oracle to access, to get data for a workshop session of our online tool. My problem occurs when the user uploads to the oracle on the server. I get the message of "scalars leaked: 1" this doesn't seem to be affecting the upload or the function of the program, its just not something I want the customer to see and think the program has errors. I've tried to look for it, but I can't seem to tell where its getting the error message (it prints only on successful completions) it also seems to have only appeared after I compiled the script to run in dos. (at users request not mine) Any help would be appreciated..... Kris

Replies are listed 'Best First'.
Re: leaking scalars
by athomason (Curate) on Sep 13, 2000 at 23:09 UTC
    Can you provide some code? It sounds like you've generated a reference somewhere that doesn't want to go away. Perl's garbage collector is based on reference counting, i.e. it reclaims a variable's memory once no references to it remain. If you've managed some convoluted circular reference magic (or DBI has done some of it for you, which happens if you don't clean up your handles properly), you could have a variable at the end of your program that resists removal. It's not a critical failure, like you say, but an annoying one.

    Short of seeing some code, I'd suggest you go back and finish all your handles after you're done with them; that has helped me with similar problems in the past.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-04-25 17:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found