A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2000-March/002551.html below:

[Python-Dev] finalization again

[Python-Dev] finalization againMoshe Zadka Moshe Zadka <mzadka@geocities.com>
Fri, 10 Mar 2000 07:32:41 +0200 (IST)
On Thu, 9 Mar 2000, Greg Stein wrote:

> > But I'd still like to reclaim the memory.  If this is some
> > long-running server process that is executing arbitrary Python
> > commands sent to it by clients, it's not nice to leak, period.
> 
> If an exception is raised, the top-level server loop can catch it, log the
> error, and keep going. But yes: it will leak.

And Tim's version stops the leaking if the server is smart enough:
occasionally, it will call gc.get_dangerous_cycles(), and nuke everything
it finds there. (E.g., clean up dicts and lists). Some destructor raises
an exception? Ignore it (or whatever). And no willy-nilly "but I'm using a
silly OS which has hardly any concept of stderr" problems! If the server
wants, it can just send a message to the log.

rooting-for-tim-ly y'rs, Z.
--
Moshe Zadka <mzadka@geocities.com>. 
http://www.oreilly.com/news/prescod_0300.html




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4