Memory Leak
Cameron Laird
claird at lairds.com
Tue Feb 24 14:48:53 EST 2004
In article <403BA63F.ACCB26CB at engcorp.com>,
Peter Hansen <peter at engcorp.com> wrote:
.
.
.
>Memory leaks are extremely difficult to debug, perhaps more difficult
>than any other problem except race conditions.
>
>Thankfully, real memory leaks are very rare. I don't think you've
.
[LOTS more sound advice]
.
.
Mostly, I just want to repeat Peter's sound counsel.
There's a LOT to say about memory errors; in fact, I'm even
trying to introduce the subject to C and C++ programmers <URL:
http://informit.com/isapi/product_id~{51BA92A2-20C7-4142-8707-FA7140CE4275}/session_id~{549AF63E-92F6-4EC1-B6B7-6A9147DF259E}/content/index.asp >
I'll pull out a few points present in Peter's description that
I think summarize the right attitude:
1. Look to yourself. Until you have strong evidence
to the contrary, assume that apparent memory pro-
blems are under your control, and are NOT an
intrinsic fault of Python.
2. The biggest return-on-investment you can reap is
to upgrade your version.
3. Next is to rationalize your own coding.
4. Next is to inspect code for memory faults. A
good developer can certify source, without re-
course to external tools. It's possible, even
practical, to learn all the basic categories
of memory error and be alert to their appear-
ance.
--
Cameron Laird <claird at phaseit.net>
Business: http://www.Phaseit.net
More information about the Python-list
mailing list