Re: [Pyunit-interest] PyUnitTestBrowser - Memory leak
Brought to you by:
purcell
From: Phlip <ppl...@om...> - 2002-06-04 00:15:20
|
Alexander Garden sez: > Of course, you don't want to apply that. The three added del > statements fixed the problem, the rest is included because I want to ask > questions. Thank you thank you. I will reduce the strength of db() soonest. > First, why is the whole thing wrapped up in a catch-all try/except that > does nothing when an exception is raised? I commented this out because > an exception was being raised every time. Because this code is crufty and via a colleague, a post on comp.lang.python, and the code in our private test runner that parallels the catch after the Official UnitTest.py. The throw-catch-pass was to prevent us from ever debugging this dumb code. The intent, in the testrunner, is to prevent an error-in-an-error from whacking the entire process. I vote to whack it. It simulates this in C++: #define db(x) std::cerr << __FILE__ << ':' << __LINE__ << \ ": " #x << x << std::endl You can see the C++ version has just a little bit less lines! Thanks for debugging the rest of this crud, but I un-crudded it for version 003. Please try http://flea.sourceforge.net/browser003.zip if you still have any enthusiasm left, but I should take a shift this evening. > And if you or someone else could clue me in as to why adding the > explicit del statements could fix a memory leak here, I'd appreciate it. > Maybe a 2.0 bug? I don't know why the legacy code said code.something in it. I will investigate via elimination! -- Phlip http://www.greencheese.org/SkeletonCrew "Men never do evil so completely and cheerfully as when they do it from religious conviction." -- Blaise Pascal |