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
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. | [reply] [d/l] |
|