Neil> On Fri, Sep 01, 2000 at 11:47:59PM +0200, Vladimir Marangozov wrote: >> By putting them in gc.collected_garbage. The next collect() should be >> able to empty this list if the DEBUG_SAVEALL flag is not set. Do you >> see any problems with this? Neil> I don't really see the point. If someone has set the SAVEALL flag Neil> then they are obviously debugging a program. I don't see much Neil> point in the GC cleaning up this garbage. The user can do it if Neil> they like. Agreed. Neil> I have an idea for an alternate interface. What if there was a Neil> gc.handle_garbage hook which could be set to a function? The Neil> collector would pass garbage objects to this function one at a Neil> time. If the function returns true then it means that the garbage Neil> was handled and the collector should not call tp_clear. These Neil> handlers could be chained together like import hooks. The default Neil> handler would simply append to the gc.garbage list. If a Neil> debugging flag was set then all found garbage would be passed to Neil> this function rather than just uncollectable garbage. Neil> Skip, would a hook like this be useful to you? Sounds too complex for my feeble brain... ;-) What's the difference between "found garbage" and "uncollectable garbage"? What sort of garbage are you appending to gc.garbage now? I thought by the very nature of your garbage collector, anything it could free was otherwise "uncollectable". S
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